Skip to main content
POST
Create an API key

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required

Key name

Required string length: 1 - 100
Example:

"Plugin survival"

type
enum<string>
required

Key type

Available options:
shop,
plugin
Example:

"plugin"

permissions
string[]

Permissions as resource:action (e.g. 'products:write', 'orders:read'). Wildcards: 'products:' (whole resource), '' (everything). Legacy aliases: read/write/delete; the admin alias is rejected. Full catalog at GET /api-keys/permissions.

Example:
shopId
string

Shop ID (for shop/plugin keys)

Pattern: ^[0-9a-fA-F]{24}$
Example:

"664f1a2b3c4d5e6f7a8b9c0d"

expiresAt
string

Expiration date (ISO 8601)

Example:

"2026-12-31T23:59:59.000Z"

Response

Key created (secret returned once)

success
boolean
Example:

true

data
object
message
string