# Update an API key

> PATCH /api-keys/{api_key_id}

Source: https://docs.trykintsugi.com/reference/2026-07-21/update-an-api-key

PATCH /api-keys/{api_key_id}

Update an API key

Update an organization API key's expiry. Requires a user credential (an Owner or Admin of the organization, selected with an `Organization-Id`). A PORTFOLIO-scope Api-Key caller still must select a target (403 without one, matching every other verb on this family) but is always refused once it has (404), since client-scoped keys have no update capability for any caller. Only a direct organization key can be updated; any other key returns 404. Send `expiresAt` to set a new expiry or null to remove it; an empty body returns 400. The response is empty on success.

Category: API Keys

Path parameters:
api_key_id (string, required) - Opaque identifier of the API key to update. Treat as opaque.

Request body:
expiresAt (string) - New expiry for the key (RFC-3339 UTC with an explicit Z), which must be in the future. Send null to remove the expiry so the key never expires. Omit the field and the request is rejected, since there is nothing to change.

Response statuses: 204, 400, 401, 403, 404, 409, 422, 503

---

Index of every page: https://docs.trykintsugi.com/llms.txt
