cURL
curl --request DELETE \ --url https://api.example.com/api/api-keys/{key_id} \ --header 'Authorization: <authorization>' \ --header 'X-Organization-Id: <x-organization-id>'
{ "success": true, "message": "API key revoked successfully", "data": { "key_id": "apikey_a1b2c3d4e5f6", "name": "Production API Key", "role": "agent_manager", "prefix": "bk_live_xxxx", "client_id": "org_abc123", "user_id": "user_def456", "status": "revoked", "created_at": "2024-01-15T10:30:00Z", "last_used_at": "2024-01-15T14:45:00Z", "expires_at": "2025-12-31T23:59:59Z" } }
status: revoked
apikey_[a-f0-9]{12}
admin
agent_manager
Show properties
revoked
403 Forbidden
{ "detail": "Only admins and agent managers can revoke API keys" }
404 Not Found
{ "detail": "API key not found or does not belong to this organization" }