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

Authorizations

Authorization
string
header
required

API key passed as a Bearer token

Path Parameters

account_id
string
required

Body

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.

Required range: 1 <= x <= 365
Example:

365

Response

Successful Response

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
required

Account publicId (acc_*) the key belongs to.

Example:

"acc_a1b2c3d4e5f6g7h8"

apiKey
string
required

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

Example:

"<shown-once-store-securely>"

id
string
required

API key publicId (ak_*).

Example:

"ak_a1b2c3d4e5f6g7h8"

prefix
string
required

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

Example:

"sk_prod_a1b2c3d4...e5f6"

mode
string
required
Example:

"prod"

expiresAt
string | null
Example:

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