Skip to main content
POST
/
api
/
enrollment-tokens
Create Enrollment Token
curl --request POST \
  --url https://api.getgranite.ai/api/enrollment-tokens \
  --header 'Content-Type: application/json' \
  --data '
{
  "description": "<string>",
  "expires_in_hours": 24
}
'
{
  "token": "<string>",
  "org_id": "<string>",
  "expires_at": "2023-11-07T05:31:56Z",
  "created_at": "2023-11-07T05:31:56Z",
  "used": true,
  "is_valid": true,
  "description": "<string>"
}

Body

application/json

Request to create an enrollment token for driver registration

description
string | null

Optional description/label for the token

expires_in_hours
integer
default:24

Hours until token expires (default 24)

Response

Successful Response

Enrollment token details

token
string
required

Enrollment token string

org_id
string
required

Organization ID

expires_at
string<date-time>
required

Token expiration timestamp

created_at
string<date-time>
required

Creation timestamp

used
boolean
required

Whether token has been used

is_valid
boolean
required

Whether token is still valid for use

description
string | null

Token description