POST
/
auth
/
refresh-token
curl --request POST \
  --url https://scribe-api.puppilot.co/auth/refresh-token \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-API-Version: <x-api-version>' \
  --data '{
  "token": "<string>"
}'
{
  "access_token": "<string>",
  "refresh_token": "<string>",
  "token_type": "bearer"
}

Request Body

  • token (string) - The refresh token issued during the initial authentication process. Used to obtain a new access token without requiring the user to sign in again.

Example Request

{
  "token": "a_refresh_token"
}

Response

  • access_token (string) - The newly generated access token.
  • refresh_token (string) - A new refresh token (if applicable).
  • token_type (string) - The type of token issued (default: “bearer”).
  • expires_at (integer) - The timestamp (Unix epoch) indicating when the access token expires.
  • refresh_expires_at (integer) - The timestamp (Unix epoch) indicating when the refresh token expires.
  • user (object) - The authenticated user details.
    • public_id (UUID) - The user’s unique identifier.
    • email (string) - The user’s email address.
    • name (string) - The user’s name.
    • organization_public_id (UUID) - The public identifier of the organization.

Example Response

{
    "access_token": "ACCESS_TOKEN_STRING",
    "refresh_token": "REFRESH_TOKEN_STRING",
    "token_type": "bearer",
    "expires_at": 1742341248,
    "refresh_expires_at": 1742942448,
    "user": {
        "public_id": "USER_PUBLIC_ID",
        "email": "user@example.com",
        "name": "User Name",
        "organization_public_id": "ORGANIZATION_PUBLIC_ID"
    }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-API-Version
string
required

API versioning is required. Include the header X-API-Version with current version value in all requests.

Example:

"v1"

Body

application/json

Response

200 - application/json

The response is of type object.