Skip to main content
PATCH

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

The API key to update. Accepts the canonical apikey_… form or the external_id:<value> form.

Example:

"apikey_01HXKD2E5NQM3T9AYWCFCSPNQY"

Body

application/json
metadata
object

UpdateAccountResourceMetadata contains the user-provided fields for updating an account-scoped resource. Read-only fields (id, account_id, profile_id) are excluded since they are set by the server.

spec
object

Configuration for an API key.

updateMask
string<field-mask>

Fields to update. Selecting spec.workspace_assignments replaces the whole set; selecting spec.all_workspaces turns the all-workspaces grant on or off. Turning it off keeps the workspaces the key currently reaches.

Response

OK

An API key. Keys belong to the account and are managed by account administrators. A key reaches the workspaces it is assigned to, or every workspace (present and future) when all_workspaces is set. Its scopes are the same in every workspace it reaches.

metadata
object
required

AccountResourceMetadata is used to represent a resource that is associated to an account but not to a workspace.

spec
object
required

Configuration for an API key.

state
enum<string>
required
read-only

The current lifecycle state of the API key. Output only. Keys are created STATE_ENABLED; use the :disable and :enable actions to transition between states.

Available options:
STATE_UNSPECIFIED,
STATE_ENABLED,
STATE_DISABLED
info
object