---
title: "POST /api/token"
method: POST
path: "/api/token"
---

# POST /api/token

`POST /api/token`

## Request

- Base URL: `https://forecaster.cairhealth.com`
- URL: `https://forecaster.cairhealth.com/api/token`
- Auth: none required

Generates authentication tokens for a client using clientId and clientSecret.

## Request body

- object
  - `clientId` string, required: The client ID of the organization
  - `clientSecret` string, required: The client secret of the organization

## Response `200`

Authentication tokens generated successfully

- object
  - `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

## Other responses

- `401`: Invalid credentials provided

## Changes

- **2026-11-03** `b32380ccde9a`: 1 info
  - added the optional property `error` to the response with the `401` status

[Operation history](https://skmtc.dev/cairhealth/apis/cair-health-apis/changes/api/token/post.md)

---

[API](https://skmtc.dev/cairhealth/apis/cair-health-apis.md) - [All operations](https://skmtc.dev/cairhealth/apis/cair-health-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/cairhealth/apis/cair-health-apis/revisions/b32380ccde9a?raw)
