CitaBox uses JWT bearer tokens for authentication. To access protected endpoints, you first obtain a token by posting credentials toDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/FerchoSG/healthcare-web/llms.txt
Use this file to discover all available pages before exploring further.
/auth/login, then include that token and a clinic identifier in the headers of every subsequent request. This page explains the login flow, header requirements, token lifecycle, and the /auth/me endpoint for retrieving the current user’s profile.
POST /auth/login
Exchange user credentials for a JWT access token and a list of clinic memberships.Request body
The user’s email address.
The user’s password.
Response — LoginResponse
JWT bearer token. Include this value in the
Authorization header of all authenticated requests.List of clinics the user belongs to. Each entry contains the clinic ID you must pass as
x-clinic-id.Request headers for authenticated endpoints
After login, include both headers on every protected request.Bearer token obtained from
POST /auth/login. Format: Bearer <access_token>.UUID of the active clinic. Obtained from the
memberships[].clinic_id field in the login response.GET /auth/me
Returns the authenticated user’s profile and current memberships. Useful for validating a stored token and refreshing membership data.Response — MeResponse
UUID of the authenticated user.
User’s first name.
User’s last name.
User’s email address.
The membership corresponding to the
x-clinic-id header sent with the request, or null if no clinic context was provided.All clinics the user belongs to.
Token lifecycle and 401 handling
Tokens do not have a built-in expiry communicated by the login response. If a token becomes invalid or expires, any API request returnsHTTP 401 Unauthorized. The CitaBox client automatically clears the stored access_token and clinic_id from local storage on a 401, forcing the user to log in again.
Public endpoints
The following paths do not requireAuthorization or x-clinic-id headers. They are intended for unauthenticated patient-facing use.
GET /public/clinics/:slugGET /booking/servicesGET /booking/doctorsGET /booking/available-slotsPOST /booking/appointments