API keys
/v1/keysRequires sign-in (OAuth). Scope: keys:manage.
View API keys and their details. Full key values are not shown.
Authorization
bearerAuth In: header
Query Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/keys"{ "data": [ { "id": "string", "key_prefix": "string", "brand_id": "string", "scopes": [ "string" ], "created_at": "string", "last_used_at": "string", "expires_at": "string", "revoked_at": "string", "name": "string", "created_by": "string", "last_used_ip": "string", "last_used_via": "string", "requests_7d": 0 } ], "next_cursor": "string"}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}/v1/keysRequires sign-in (OAuth). Scope: keys:manage.
Create an API key with the permissions your integration needs. Copy the key when it is returned; it is shown once.
Authorization
bearerAuth In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/keys" \ -H "Content-Type: application/json" \ -d '{ "scopes": [ "string" ] }'{ "id": "string", "key_prefix": "string", "brand_id": "string", "scopes": [ "string" ], "created_at": "string", "last_used_at": "string", "expires_at": "string", "revoked_at": "string", "name": "string", "created_by": "string", "last_used_ip": "string", "last_used_via": "string", "requests_7d": 0, "plaintext": "string"}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}/v1/key-scopesRequires sign-in (OAuth). Scope: keys:manage.
The scopes this brand can give an API key right now. Creating or editing a key with any other scope fails.
Authorization
bearerAuth In: header
Query Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/key-scopes"{ "scopes": [ "string" ]}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}/v1/keys/{id}Requires sign-in (OAuth). Scope: keys:manage.
View one API key with its daily request counts for the last 30 days and its change history.
Authorization
bearerAuth In: header
Path Parameters
Query Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/keys/string"{ "id": "string", "key_prefix": "string", "brand_id": "string", "scopes": [ "string" ], "created_at": "string", "last_used_at": "string", "expires_at": "string", "revoked_at": "string", "name": "string", "created_by": "string", "last_used_ip": "string", "last_used_via": "string", "requests_7d": 0, "usage": [ { "day": "string", "requests": 0 } ], "history": [ { "action": "string", "actor": "string", "created_at": "string", "details": { "property1": null, "property2": null } } ]}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}/v1/keys/{id}Requires sign-in (OAuth). Scope: keys:manage.
Rename an API key, change its permissions or change when it expires. The key value does not change, so anything using it keeps working with the new permissions.
Authorization
bearerAuth In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/v1/keys/string" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "string", "key_prefix": "string", "brand_id": "string", "scopes": [ "string" ], "created_at": "string", "last_used_at": "string", "expires_at": "string", "revoked_at": "string", "name": "string", "created_by": "string", "last_used_ip": "string", "last_used_via": "string", "requests_7d": 0}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}/v1/keys/{id}Requires sign-in (OAuth). Scope: keys:manage.
Revoke an API key. Returns 404 if it cannot be found or has already been revoked.
Authorization
bearerAuth In: header
Path Parameters
Query Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://example.com/v1/keys/string"{ "id": "string", "key_prefix": "string", "brand_id": "string", "scopes": [ "string" ], "created_at": "string", "last_used_at": "string", "expires_at": "string", "revoked_at": "string", "name": "string", "created_by": "string", "last_used_ip": "string", "last_used_via": "string", "requests_7d": 0}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}/v1/keys/{id}/rotateRequires sign-in (OAuth). Scope: keys:manage.
Replace an API key, keeping its name, expiry and permissions or choosing new permissions. The previous key stops working immediately, or after grace_seconds (up to 7 days) so you can swap it without downtime.
Authorization
bearerAuth In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/keys/string/rotate" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "string", "key_prefix": "string", "brand_id": "string", "scopes": [ "string" ], "created_at": "string", "last_used_at": "string", "expires_at": "string", "revoked_at": "string", "name": "string", "created_by": "string", "last_used_ip": "string", "last_used_via": "string", "requests_7d": 0, "plaintext": "string"}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}{ "error": { "code": "bad_request", "message": "string" }}