latestOpenAPI 3.1.02026-08-153864115.7 MB
c301132dbfd7
API Keys
Create API Key
Creates an API key for an account or app. The response is the only place the full secret_key is returned — store it immediately. Requires a user session; API keys cannot manage API keys.
post/api_keys
Headers
Idempotency-Keystring
Example:d9105228-4a08-46b1-8b91-42fed586d383
A unique key that makes this request safe to retry. See Idempotent requests.
Request body
Example request
{
"api_version_date": "2026-08-13",
"expires_at": "2026-01-01T12:00:00.000Z",
"ip_allowlist": [
"203.0.113.0/24"
],
"name": "Shine Time Booking (production)",
"permissions": {
"statements": [
{
"actions": [
"company:basic:read"
],
"grant": true,
"resources": [
"biz_xxxxxxxxxxxxxx"
]
}
],
"system_role": "admin"
},
"resource_id": "biz_xxxxxxxxxxxxxx",
"resource_type": "account"
}Response
api key created
Example response
{
"api_version_date": "2026-08-13",
"created_at": "2026-01-01T12:00:00.000Z",
"expires_at": "2026-01-01T12:00:00.000Z",
"grants": [
{
"actions": [
{
"action": "ai_prompt:create"
}
],
"resource_id": "biz_xxxxxxxxxxxxxx",
"resource_type": "account"
}
],
"id": "apik_xxxxxxxxxxxxxx",
"ip_allowlist": [
"203.0.113.0/24"
],
"name": "Shine Time Booking (admin role)",
"obfuscated_secret_key": "apik_xxxx....xxxx",
"secret_key": "apik_xxxxxxxxxxxxxx_C0000_C_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"system_role": "admin",
"updated_at": "2026-01-01T12:00:00.000Z"
}