API keys
Create an API key
Authorization
ApiKey AuthorizationBearer <token>
Bearer API key in the form sk_live_…, sk_test_…, or pk_live_…. Keys are issued from the Consistly dashboard and carry product-prefixed scopes.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Issue a new API key. The plaintext secret is only returned in this response.
Response Body
application/json
curl -X POST "https://example.com/api_keys" \ -H "Content-Type: application/json" \ -d '{ "name": "CI pipeline", "prefix_type": "sk", "mode": "test", "scopes": [ "brand:read", "brand:checks:write" ] }'{ "id": "string", "object": "api_key", "name": "string", "prefix_type": "sk", "mode": "live", "last_four": "string", "scopes": [ "platform:read" ], "livemode": true, "created": "2019-08-24T14:15:22Z", "updated": "2019-08-24T14:15:22Z", "last_used_at": "2019-08-24T14:15:22Z", "revoked_at": "2019-08-24T14:15:22Z", "metadata": { "property1": "string", "property2": "string" }, "organization": "string", "created_by": "string", "secret": "string"}