Create a new API key
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.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Display name of the key.
100Per-domain access level (none, read or write) for restricted keys; domain ids come from the capability catalog.
Expiry and other limits applied to the key.
Legacy expiry as an RFC 3339 timestamp; prefer constraints.expires_at.
Lifecycle binding: a user-owned key is revoked with the user, a service-account key outlives any user.
Permission preset; restricted keys hold only the domains granted in access.
all, restricted, read_only, PERMISSION_MODE_ALL, PERMISSION_MODE_RESTRICTED, PERMISSION_MODE_READ_ONLY Projects the key may reach: every project of the workspace or a single one.
Legacy single-project binding; prefer project_scope.
1Response
API key created successfully.
Raw on create; the key prefix on retrieve and update; masked in list responses.

