ReferenceApi keys
Create an API key
Mints a key and registers it with the gateway.
The plaintext key is returned once, in this response. It is not recoverable afterwards — store it immediately.
Authorization
ApiKeyAuth x-api-key<token>
A platform key (ck_live_…). Mint one in the console under
Settings → API Keys.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/api-keys" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{ "key_id": "string", "name": "string", "prefix": "string", "scopes": [ "string" ], "created_at": "2019-08-24T14:15:22Z", "last_used_at": "2019-08-24T14:15:22Z", "usage_count": 0, "expires_at": "2019-08-24T14:15:22Z", "api_key": "string"}Was this page helpful?Report an issue