v1

latestOpenAPI 3.1.02026-07-265817860.8 KB
keys

Exchanges a refresh token (sent as the Bearer credential) for a freshly rotated access + refresh pair. Self-service for the token holder — no secret key required. The previous refresh token is honored for one rotation as a grace window; replaying an older one revokes the customer's tokens.

post/v1/keys.refresh

Headers

x-api-versionstring required

Request body

object required

No body. The refresh token is supplied as the Bearer credential; the response is a freshly rotated access + refresh pair.

Example request

{}

Response

OK

access_tokenstring required

Access token (1h, or non-expiring if indefinite), prefixed am_jwt_.

refresh_tokenstring

Rotating refresh token (24h). Omitted for indefinite tokens.

expires_atnumber nullable required

Access-token expiry, ms since epoch. null for indefinite tokens.

refresh_expires_atnumber

Refresh-token expiry, ms since epoch. Omitted for indefinite tokens.

Example response

{
  "access_token": "am_jwt_eyJhbGciOiJIUzI1NiJ9...",
  "refresh_token": "am_jwt_eyJhbGciOiJIUzI1NiJ9...",
  "expires_at": 1781113864000,
  "refresh_expires_at": 1781196664000
}