Skip to main content

Endpoint

PATCH /api-keys/{keyId}
Auth: API Key or Session
Content-Type: application/json

Path parameters

keyId
string
required
ID of the key to update. Retrieve it from List API Keys.

Body parameters

name
string
New display name for the key.
enabled
boolean
Set to false to temporarily disable the key without deleting it. Set to true to re-enable.

Response

{
  "success": true,
  "key": {
    "id": "key_abc123",
    "name": "production-v2",
    "enabled": true
  },
  "message": "API key updated"
}
Status codes: 200 success · 401 unauthorized · 403 forbidden · 404 not found · 500 error

Examples

curl -X PATCH http://localhost:3000/api-keys/key_abc123 \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  -d '{"name": "production-v2"}'

List API Keys

Find the key ID.

Delete API Key

Permanently revoke a key.