POST
/
api
/
token
cURL
curl --request POST \
  --url https://forecaster.cairhealth.com/api/token \
  --header 'Content-Type: application/json' \
  --data '{
  "clientId": "xxxxx-xxxxxx-xxxxxxx",
  "clientSecret": "xxxxx-xxxxxx-xxxxxxx"
}'
{
  "accessToken": "xxxxxxxxxxxxx.xxxxxxxx",
  "refreshToken": "xxxxxxxxxxxxx.xxxxxxxx",
  "expiresAt": "2025-03-24T18:38:47.781Z",
  "refreshTokenExpiresAt": "2025-03-25T18:28:47.781Z"
}
This endpoint as well as /api/refresh will be used in tandem to provide authentication to all of our public endpoints. These endpoints require your clientId and clientSecret which can be found in your admin panel.

Body

application/json

Client credentials for authentication

clientId
string
required

The client ID of the organization

clientSecret
string
required

The client secret of the organization

Response

Authentication tokens generated successfully

accessToken
string

Access token to use in your API request

refreshToken
string

Refresh token to refresh your access token

expiresAt
string<date-time>

Date and timestamp at which the access token will expire

refreshTokenExpiresAt
string<date-time>

Date and timestamp at which the refresh token will expire