Update an API key
Updates name, expiresAt, and/or access; omitted fields are left unchanged, and sending none returns the current metadata. Providing access replaces the entire access configuration atomically — previous grants are removed and the change applies to the next request that uses the key; any website id belonging to another organization fails with 400. On a revoked or already-expired key, setting expiresAt (including null to remove expiry) or access fails with 409, because inactive keys cannot be made active again; renames still succeed.
Authorizations
Cactal API key. Create one in the dashboard or via POST /apiKeys. The plaintext key is shown once at creation.
Path Parameters
1Body
1 - 200^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$When provided, replaces the entire access configuration of the key atomically; previous grants are removed. Omit to leave access unchanged.
- Option 1
- Option 2
Response
The updated key metadata.
Unique id of the API key.
Human-readable label, 1–200 characters.
Id of the organization that owns the key.
Access configuration of an API key: either one organization-wide role, or one role across an explicit set of websites. The owner role can never be granted to an API key.
- Option 1
- Option 2
When the key stops authenticating. null when it never expires.
When the key was revoked. null while the key is active.
When the key was created.