OpenAPI 3.1.02026-08-143874115.7 MB
a84d4905fdbb
API Keys
Rotate API Key
Rotates the API key's secret, invalidating the previous secret immediately. The response is the only place the new secret_key is returned.
post/api_keys/{id}/rotate
Headers
Idempotency-Keystring
Example:d9105228-4a08-46b1-8b91-42fed586d383
A unique key that makes this request safe to retry. See Idempotent requests.
Response
api key rotated
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"
}