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
| Name | Type | Required | Description |
|---|---|---|---|
id | integer (int64) | yes | — |
Request body
application/json
| Field | Type | Required | Description |
|---|---|---|---|
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
| Field | Type | Description |
|---|---|---|
success | boolean | — |
message | string | — |
data | ApiKeyResponseDto | — |
Status codes
200— API key updated successfully400— Invalid request, no fields provided, or key is revoked401— User is not authenticated403— User does not have access to Settings pillar404— API key not found409— API key with this name already exists429— —
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.