Measura API documentation · v1

Authentication

Learn how to authenticate your requests to the Measura API.

API key authentication

All API requests must include an API key in the Authorization header. API keys are generated through the app settings and must be active and not expired. Each API key is tied to a specific Shopify store. Public API access requires the Enterprise plan or explicitly provided access. Missing, invalid, revoked, or expired keys return 401; unavailable public API access returns 403.

Code example
Authorization: Bearer <api-key>

The API key should be in the format: apik_<keyId>_<secret>

Alternative Authentication

Legacy form callers may supply key in an application/x-www-form-urlencoded or multipart/form-data body when the Authorization header is absent. GET and JSON requests must use the header; query-string keys are not supported.

Note:

Keep your API key secure and never expose it in client-side code or public repositories.

Generating API keys

API keys can be generated through the Measura app settings in your Shopify admin. Each key consists of:

  • A unique key ID that identifies the API key
  • A secret that must be kept confidential
  • An expiration date (optional, but recommended)

Best Practices

  • Rotate API keys regularly for enhanced security
  • Use different keys for different applications or environments
  • Set expiration dates on keys when possible
  • Never commit API keys to version control

Resource access

Kit endpoints require an active Kit Builder add-on and its applicable tier limits. Order endpoints require an active Order Edit add-on. Public API authentication alone does not grant these features. GET /me reports the shop, plan, and existing capability flags; these flags do not replace the resource-specific add-on checks.

Before sending writes, read the write safety guide for idempotency, revisions, and recovery.

Next steps

Now that you understand authentication, explore the available API endpoints: