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

Autorizaciones

Authorization
string
header
requerido

Clave API enviada como token Bearer

Parámetros de ruta

account_id
string
requerido

Cuerpo

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.

Rango requerido: 1 <= x <= 365
Ejemplo:

365

Respuesta

Respuesta exitosa

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
requerido

Account publicId (acc_*) the key belongs to.

Ejemplo:

"acc_a1b2c3d4e5f6g7h8"

apiKey
string
requerido

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

Ejemplo:

"<shown-once-store-securely>"

id
string
requerido

API key publicId (ak_*).

Ejemplo:

"ak_a1b2c3d4e5f6g7h8"

prefix
string
requerido

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

Ejemplo:

"sk_prod_a1b2c3d4...e5f6"

mode
string
requerido
Ejemplo:

"prod"

expiresAt
string | null
Ejemplo:

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