Create an API key for a merchant
Requires the api_key.create permission and JWT (dashboard) authentication — API-key authentication is rejected on key-management endpoints.
Creates a new API key for a merchant that belongs to the authenticated organization. The response is the only place the full key is ever returned (show-once); afterwards only the masked prefix and last 4 characters are visible. A company can hold at most 20 active keys.
Authorizations
JWT token for user authentication
Path Parameters
The merchant ID
Body
Client-chosen label to identify the key
100"Production backend"
Future datetime when the key stops authenticating; omit for a non-expiring key
"2027-01-01T00:00:00Z"
Permission strings granted to the key (see GET /v1/permissions); omit for full access
1Response
The created API key, including the full key (shown once)
"123e4567-e89b-12d3-a456-426614174000"
"Production backend"
First 7 characters of the key, for masked display
"ak_Ab12"
Last 4 characters of the key, for masked display
"x9Zk"
Last authentication with this key (updated at most every 5 minutes)
"2026-07-20T12:00:00Z"
When the key stops authenticating; null means it never expires
null
When the key was revoked; null means it is active
null
"2026-07-01T00:00:00Z"
The full API key. Shown only in this response — store it securely; it cannot be retrieved again.
"ak_Ab12Cd34Ef56Gh78Ij90Kl12Mn34Op56Qr78x9Zk"

