API keys

Update an API key

Changed on

Updates mutable fields of an API key: display name, status (active / disabled / revoked), permission mode and access map, project scope and constraints. Omitted fields keep their current values. Unknown body fields are rejected.

patch/v2/api-keys/{api_key_id}

Request

  • Base URL
    https://my.orq.ai
  • URL
    https://my.orq.ai/v2/api-keys/{api_key_id}
  • Auth
    HTTP bearer

Path parameters

api_key_idstring required

Unique identifier of the API key.

Request body

accessobject

Per-domain access level (none, read or write) for restricted keys.

activeboolean

Legacy toggle mirrored onto status: false disables, true re-enables.

namestring

New display name.

permission_mode'all' | 'restricted' | 'read_only' | 'PERMISSION_MODE_ALL' | 'PERMISSION_MODE_RESTRICTED' | 'PERMISSION_MODE_READ_ONLY'

Permission preset; a restricted key must keep at least one granted domain.

status'active' | 'disabled' | 'revoked'

Lifecycle status; revoked is terminal.

Response

API key updated successfully.

idstring required
namestring required
workspace_idstring required
tokenstring required

Raw on create; the key prefix on retrieve and update; masked in list responses.

activeboolean
is_legacyboolean
sourcestring
budgetobject
expirationstring date-time
projectsstring[]
created_by_idstring nullable
updated_by_idstring nullable
createdstring date-time
updatedstring date-time
consumptionnumber
token_consumptionnumber
requests_per_minute_consumptionnumber
ownerobject
project_scopeobject
permission_modestring
accessobject
token_prefixstring
statusstring
constraintsobject
mcp_accessobject
legacy_token_familystring
legacy_key_idstring
last_used_atstring date-time

Changes

    • breaking

      removed the enum value ACCESS_LEVEL_NONE of the request property /

    • breaking

      removed the enum value ACCESS_LEVEL_READ of the request property /

    • breaking

      removed the enum value ACCESS_LEVEL_WRITE of the request property /

    • breaking

      removed the enum value API_KEY_STATUS_ACTIVE of the request property

    • breaking

      removed the enum value API_KEY_STATUS_DISABLED of the request property

    • breaking

      removed the enum value API_KEY_STATUS_REVOKED of the request property

    • breaking

      removed the enum value API_KEY_STATUS_UNSPECIFIED of the request property

    • breaking

      removed the enum value PERMISSION_MODE_UNSPECIFIED of the request property

    • breaking

      the request property type changed from no type to object

    • warning

      removed from the request property allOf list

    • warning

      the request property's maxLength was set to 100

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property /

    • info

      added the new optional request property /

    • info

      added the new optional request property /

    • info

      added the new optional request property /

    • info

      added the new active enum value to the request property

    • info

      added the new all enum value to the request property

    • info

      added the new disabled enum value to the request property

    • info

      added the new read_only enum value to the request property

    • info

      added the new restricted enum value to the request property

    • info

      added the new revoked enum value to the request property

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • breaking

      added to the request property allOf list

    • breaking

      request property / was restricted to a list of enum values

    • breaking

      removed the enum value active of the request property

    • breaking

      removed the enum value all of the request property

    • breaking

      removed the enum value disabled of the request property

    • breaking

      removed the enum value read_only of the request property

    • breaking

      removed the enum value restricted of the request property

    • breaking

      removed the enum value revoked of the request property

    • breaking

      the request property type changed from object to no type

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property /

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new ACCESS_LEVEL_NONE enum value to the request property /

    • info

      added the new ACCESS_LEVEL_READ enum value to the request property /

    • info

      added the new ACCESS_LEVEL_WRITE enum value to the request property /

    • info

      added the new API_KEY_STATUS_ACTIVE enum value to the request property

    • info

      added the new API_KEY_STATUS_DISABLED enum value to the request property

    • info

      added the new API_KEY_STATUS_REVOKED enum value to the request property

    • info

      added the new API_KEY_STATUS_UNSPECIFIED enum value to the request property

    • info

      added the new PERMISSION_MODE_UNSPECIFIED enum value to the request property

    • info

      removed the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      removed the non-success response with the status