Skip to main content
PATCH
Update an API key

Authorizations

Authorization
string
header
required

Cactal API key. Create one in the dashboard or via POST /apiKeys. The plaintext key is shown once at creation.

Path Parameters

apiKeyId
string
required
Minimum string length: 1

Body

application/json
name
string
Required string length: 1 - 200
expiresAt
string<date-time> | null
Pattern: ^(?:(?:\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))$
access
object

When provided, replaces the entire access configuration of the key atomically; previous grants are removed. Omit to leave access unchanged.

Response

The updated key metadata.

id
string
required

Unique id of the API key.

name
string
required

Human-readable label, 1–200 characters.

organizationId
string
required

Id of the organization that owns the key.

access
object
required

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.

expiresAt
string<date-time> | null
required

When the key stops authenticating. null when it never expires.

revokedAt
string<date-time> | null
required

When the key was revoked. null while the key is active.

createdAt
string<date-time>
required

When the key was created.