Create a new API key for the organization
Send your access token as header Authorization: Bearer {accessToken}
Request body for creating a new API key
Human-readable label for the API key
255Human-readable description for the API key
List of scopes this API key has access to
invoices.create, invoices.update, invoices.read, payments.create, payments.update, payments.read, products.create, products.read, products.update, products.delete, api_keys.create, api_keys.update, api_keys.delete, api_keys.read, webhooks.create, webhooks.read, webhooks.update, webhooks.delete, webhooks_queue.read, webhooks_queue.update, notifications.read, notifications.update, notifications_settings.read, notifications_settings.update, organizations.create, organizations.read, organizations.update, organizations.deactivate, users.update, users.deactivate, users.sessions.read, users.sessions.deactivate List of IP addresses allowed to use this API key
Timestamp when the API key expires
"2025-06-29 16:03:44"
Successful API key creation response
Status code of the response
200, 201, 202 Response data containing the requested object
{
"id": "api_key_0197c0f1-9589-7990-b421-4b806f637b0c",
"organization_id": "org_0197c0f1-9589-7990-b421-4b806f637b0c",
"label": "My API Key",
"description": "Key for accessing product APIs",
"secret": "sk_live_MDE5N2MwZjEtOTU4OS03N2U0LWJiY2YtNGQ0OWQ4YTM5NzUzX2JpdGdwdA",
"scopes": ["products.create"],
"ip_allow_list": ["127.0.0.1"],
"expires_at": "2026-05-30 20:23:16",
"created_at": "2025-06-30 15:05:47",
"updated_at": null,
"metrics": {
"api_key_id": "api_key_0197c0f1-9589-7990-b421-4b806f637b0c",
"total_requests": 150,
"last_used_at": "2025-06-30 16:03:44"
}
}
Message of the response, human readable
"Resource created successfully"
API environment
development, production Error message of the response, human readable
"Invalid email address"
Useful informaiton, not always present, to debug the response
{ "request_id": "req_1234567890" }
"Some pertinent log message"
Validator response object, each key is the field name and value is the error message
{
"email": "Invalid email address",
"password": "Password is required"
}
Support ID linked to the response, used to identify it when talking with our team
"support_uuidv7-something-else"