Management keys

Create a new management key

Changed on

Mints a new opaque management key (sk-orq-<key_id>-<secret>) in the workspace. The raw secret is returned ONCE in the response and is never retrievable afterwards. The stored record retains only token_prefix and a SHA-256 token_hash.

post/v2/management-keys

Request

Request body

namestring required

Human-readable name. Required.

permission_mode'MANAGEMENT_PERMISSION_MODE_ALL' | 'MANAGEMENT_PERMISSION_MODE_RESTRICTED' | 'MANAGEMENT_PERMISSION_MODE_READ_ONLY' required
accessobject

Per-domain access map. Required when permission_mode = MANAGEMENT_PERMISSION_MODE_RESTRICTED. See ManagementKey.access for the catalog of valid keys (Domain.id) and AccessLevel string values, or fetch the live catalog via the capability catalog endpoint.

expires_atstring date-time

Optional expiration. The key is rejected once expires_at is in the past. Unset means the key never expires.

Response

OK

tokenstring required

Raw bearer token in the form sk-orq-<management_key_id>-<secret>. Returned ONCE; the API never exposes this value again.

Changes

    • breaking

      removed the enum value MANAGEMENT_PERMISSION_MODE_UNSPECIFIED of the request property

    • info

      added the non-success response with the status

    • info

      removed the MANAGEMENT_KEY_STATUS_UNSPECIFIED enum value from the ///// response property for the response status

    • info

      removed the MANAGEMENT_PERMISSION_MODE_UNSPECIFIED enum value from the ///// response property for the response status

    • warning

      added the new MANAGEMENT_KEY_STATUS_UNSPECIFIED enum value to the ///// response property for the response status

    • warning

      added the new MANAGEMENT_PERMISSION_MODE_UNSPECIFIED enum value to the ///// response property for the response status

    • info

      added the new MANAGEMENT_PERMISSION_MODE_UNSPECIFIED enum value to the request property

    • info

      removed the non-success response with the status