API keys

Create a new API key

Changed on

Mints an opaque sk-orq- API key. Use project_scope to bind it to a single project and permission_mode with access to restrict permissions. A management key with API-key write access can create keys. The legacy projects field is also accepted. The raw token is returned once in the token field and is never retrievable afterwards. Unknown body fields are rejected.

post/v2/api-keys

Request

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

Request body

accessobject

Per-domain access level (none, read or write) for restricted keys; domain ids come from the capability catalog.

expirationstring date-time

Legacy expiry as an RFC 3339 timestamp; prefer constraints.expires_at.

namestring required

Display name of the key.

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

Permission preset; restricted keys hold only the domains granted in access.

projectsstring[] nullable

Legacy single-project binding; prefer project_scope.

Response

API key created 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

      added the new required request property /

    • 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 PERMISSION_MODE_UNSPECIFIED of the request property

    • breaking

      the request property type changed from no type to object

    • breaking

      the request property type changed from no type to object

    • warning

      removed from the request property allOf list

    • 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 optional request property /

    • info

      added the new optional request property

    • info

      added the new all 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 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

      added to the request property allOf list

    • breaking

      request property / was restricted to a list of enum values

    • breaking

      removed the enum value all 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

      the request property type changed from object to no type

    • 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 /

    • 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 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