API Reference / API Keys

Update API key

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

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

Updates the display name and/or expiry of an existing API key. Scopes are immutable — to change scopes, revoke and recreate.

Example request

curl -X PATCH "https://api.intelig.ai/api/v1/intelig/api-keys/1" \
  -H "Authorization: ApiKey $INTELIG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "tree-inventory-ai integration (read-only)",
    "expiresAt": "2027-06-30T00:00:00Z"
  }'

Path parameters

NameTypeRequiredDescription
id integer (int64) yes

Request body

application/json

FieldTypeRequiredDescription
name string no New label for the key. Omit to leave it unchanged. Example: tree-inventory-ai integration (read-only)
expiresAt string (date-time) no New expiry instant (ISO-8601, UTC). Omit to leave the expiry untouched. Example: 2027-06-30T00:00:00Z

Response 200

application/json · ApiResponseApiKeyResponseDto

FieldTypeDescription
success boolean
message string
data ApiKeyResponseDto

Status codes

  • 200 — API key updated successfully
  • 400 — Invalid request, no fields provided, or key is revoked
  • 401 — User is not authenticated
  • 403 — User does not have access to Settings pillar
  • 404 — API key not found
  • 409 — API key with this name already exists
  • 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.