Skip to main content

POST /auth/refresh

Exchange a refresh_token for a new access_token and refresh_token pair. Use this when the current access token has expired.
This endpoint does not require authentication.

Request body

ParameterTypeRequiredDescription
refresh_tokenstringYesThe refresh token obtained from POST /auth/login or a previous refresh

Request

curl -X POST https://api.dokstamp.eu/auth/refresh \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{ "refresh_token": "def50200a9c4b..." }'

Response 200

{
  "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...",
  "refresh_token": "def50200newtoken...",
  "token_type": "Bearer",
  "expires_in": 31536000
}
The old refresh_token is invalidated after use. Always store the new refresh_token returned in this response.

Error 401

{ "message": "The refresh token is invalid." }