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" } ], "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", "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/keys/{id}/rotateRequires sign-in (OAuth). Scope: keys:manage.
Replace an API key, keeping its permissions or choosing new ones. The previous key stops working immediately.
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", "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/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"}{ "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" }}