POST
/
api
/
token
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

The body is of type object.

Response

200
application/json
Authentication tokens generated successfully

The response is of type object.