a84d4905fdbb
latestOpenAPI 3.1.02026-08-143874115.7 MBAPI Keys
Update API Key
Updates an API key's name, permissions, API version, expiration, or IP allowlist. Fields that are omitted keep their current value; default keys cannot be modified.
patch/api_keys/{id}
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 (staging)",
"permissions": {
"statements": [
{
"actions": [
"company:basic:read"
],
"grant": true,
"resources": [
"biz_xxxxxxxxxxxxxx"
]
}
],
"system_role": "admin"
}
}Response
api key updated
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"
}