Pular para o conteúdo principal
POST
Create a new management key
Guia relacionado: guia de Chaves de gerenciamento. Consulte o guia de Chaves de gerenciamento para um passo a passo com exemplos.

Autorizações

Authorization
string
header
obrigatório

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

Corpo

application/json
name
string
obrigatório

Human-readable name. Required.

permission_mode
enum<string>
obrigatório

Permission preset. Required; an omitted or unspecified value is rejected with INVALID_ARGUMENT rather than defaulted to full access.

Opções disponíveis:
MANAGEMENT_PERMISSION_MODE_ALL,
MANAGEMENT_PERMISSION_MODE_RESTRICTED,
MANAGEMENT_PERMISSION_MODE_READ_ONLY
access
object

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_at
string<date-time>

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

Resposta

OK

management_key
object
obrigatório

Newly minted management-key record.

token
string
obrigatório

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