Create API key
POST
/ admin/ v1/ stores/ {store_id}/ api-keys- api_keys:manage
- Idempotency-Key supported
Issue an API key. The token is returned once.
Path parameters
store_idstringrequiredThe store's ID, like
store_01k8qs5s…. Apps get it with the install, in the OAuth redirect and the token response.
Headers
Idempotency-KeystringSend the same key to retry safely: the first answer is replayed for 24 hours.
shop-api-versionYYYY-MMThe version to answer in. Without it, your app’s pinned version, else the newest.
Body
kindenumrequiredWhat a key can be used for.
- publishable
- secret
namestringrequiredpermissionsarray of strings · or nullSecret keys only. Defaults to every non-sensitive permission you hold.
storefront_urlstring · or nullPublishable keys only: the headless storefront's address (
https://…).allowed_originsarray of stringsPublishable keys only: the origins its storefronts run on (
https://shop.example.com), at most 20. Empty: any origin.
Returns
201 Key created; copy the token now.
Errors
- 403
forbiddenMissing permission. - 422
validation_failedValidation failed.