Skip to content

Rotate an access token

POST
/api/v1/auth/refresh
curl --request POST \
--url https://example.com/api/v1/auth/refresh \
--header 'Content-Type: application/json' \
--data '{ "refresh_token": "example" }'
Media typeapplication/json
RefreshRequest
object
refresh_token
required
Refresh Token
string

Example generated

{
"refresh_token": "example"
}

Successful Response

Media typeapplication/json
object
success
required
boolean
default: true
data
required
TokenResponse
object
access_token
required
Access Token
string
refresh_token
required
Refresh Token
string
token_type
Token Type
string
default: bearer
expires_in
required
Expires In

Access token lifetime in seconds

integer

Example

{
"success": true,
"data": {
"token_type": "bearer",
"expires_in": 28800
}
}

Unauthorized

Media typeapplication/json
ErrorResponse
object
error
required
ErrorDetail
object
code
required
Code
string
message
required
Message
string
details
Details
correlation_id
Correlation Id
Any of:
string

Example

{
"error": {
"code": "not_found",
"correlation_id": "0f4b9a2e-6c2b-4f0e-9a4a-1c2b3d4e5f60",
"message": "AI system not found."
}
}

Forbidden

Media typeapplication/json
ErrorResponse
object
error
required
ErrorDetail
object
code
required
Code
string
message
required
Message
string
details
Details
correlation_id
Correlation Id
Any of:
string

Example

{
"error": {
"code": "not_found",
"correlation_id": "0f4b9a2e-6c2b-4f0e-9a4a-1c2b3d4e5f60",
"message": "AI system not found."
}
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object

Example generated

{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}

Too Many Requests

Media typeapplication/json
ErrorResponse
object
error
required
ErrorDetail
object
code
required
Code
string
message
required
Message
string
details
Details
correlation_id
Correlation Id
Any of:
string

Example

{
"error": {
"code": "not_found",
"correlation_id": "0f4b9a2e-6c2b-4f0e-9a4a-1c2b3d4e5f60",
"message": "AI system not found."
}
}