Skip to main content
POST
Regenerate a doctor account's API key

Autorizações

Authorization
string
header
obrigatório

Chave de API enviada como token Bearer

Parâmetros de caminho

account_id
string
obrigatório

Corpo

application/json

Request body for regenerating (rotating) a doctor account's API key.

validForDays
integer | null

New key lifetime in days (1–365). Omit to keep the account's default lifetime.

Intervalo obrigatório: 1 <= x <= 365
Exemplo:

365

Resposta

Resposta bem-sucedida

Response after rotating a doctor account's API key.

Mirrors the API-key fields returned on account creation, for the rotated key. The raw key is shown only once — store it securely.

accountId
string
obrigatório

Account publicId (acc_*) the key belongs to.

Exemplo:

"acc_a1b2c3d4e5f6g7h8"

apiKey
string
obrigatório

Raw API key. Shown only once — store it securely.

Exemplo:

"<shown-once-store-securely>"

id
string
obrigatório

API key publicId (ak_*).

Exemplo:

"ak_a1b2c3d4e5f6g7h8"

prefix
string
obrigatório

Non-secret key prefix, safe to display/store for identification.

Exemplo:

"sk_prod_a1b2c3d4...e5f6"

mode
string
obrigatório
Exemplo:

"prod"

expiresAt
string | null
Exemplo:

"2027-01-15T10:30:00Z"