Skip to content

Access token refresh

POST
/v2/auth/refresh
curl --request POST \
--url https://api-admin.billz.ai/v2/auth/refresh \
--header 'Content-Type: application/json' \
--header 'platform-id: 7d4a4c38-dd84-4902-b744-0488b80a4c01' \
--data '{ "refresh_token": "REFRESH_TOKEN" }'

Error codes: 400 — input validation error; 401, 403, 429, 500 — shared by all methods. Body formats and semantics: Response codes and errors.

platform-id
string
default: 7d4a4c38-dd84-4902-b744-0488b80a4c01

Platform identifier. A static value is used for integrations.

Media typeapplication/json
object
refresh_token
required

One-time refresh token. Empty — 400 invalid_request. Limited in length

string
Example
{
"refresh_token": "REFRESH_TOKEN"
}

Successful response

Media typeapplication/json
object
code

200 on success

integer format: int32
message

‘ok’ on success; on error — a human-readable description

string
error

Null on success; on error — a string RFC 6749 §5.2 code

integer format: int32
nullable
data
object
token_type

Always Bearer

string
access_token

New access token

string
refresh_token

New refresh token; absent if not issued

string
expires_in

Access token lifetime in seconds

integer format: int32
refresh_expires_in

Refresh token lifetime in seconds; absent if not set

integer format: int32
Examplegenerated
{
"code": 1,
"message": "example",
"error": 1,
"data": {
"token_type": "example",
"access_token": "example",
"refresh_token": "example",
"expires_in": 1,
"refresh_expires_in": 1
}
}