API Reference / API Keys

Rotate API key

post https://api.intelig.ai/api/v1/intelig/api-keys/{id}/rotate

Auth: Authorization: ApiKey <key> (an API key sent as Bearer is rejected) or Authorization: Bearer <jwt> for a dashboard session. operationId: rotateApiKey

Generates a new secret for an existing API key. The new key is returned only once.

Example request

curl -X POST "https://api.intelig.ai/api/v1/intelig/api-keys/1/rotate" \
  -H "Authorization: ApiKey $INTELIG_API_KEY"

Path parameters

NameTypeRequiredDescription
id integer (int64) yes

Response 200

application/json · ApiResponseRotateApiKeyResponseDto

FieldTypeDescription
success boolean
message string
data RotateApiKeyResponseDto

Status codes

  • 200 — API key rotated successfully
  • 400 — Cannot rotate a revoked key
  • 401 — User is not authenticated
  • 403 — User does not have access to Settings pillar
  • 404 — API key not found
  • 429 — —

Every response is wrapped in { success, message, data }. A 4xx means the request is wrong — do not retry it unchanged. A 429 carries Retry-After in seconds.