Thrive AI Health
Api reference

Issue a member-scoped bearer token

Exchange the tenant API key plus a partner-scoped `user_id` for a short-lived member bearer token. The token (TTL: 1 hour) is forwarded to the partner's client and used as `Authorization: Bearer <token>` on every member-scoped call. Renew proactively before expiry or reactively on `401 unauthorized`. The tenant API key must remain on partner-controlled backend infrastructure — never embed it in mobile or browser clients.

POST
/v1/auth/token
org-id<token>

Tenant identifier resolved by Kong from the authenticated taih-tenant-key. Required on partner-scoped routes (e.g. POST /v1/users, POST /v1/auth/token, /v1/admin/*). In production Kong injects this header after validating the tenant key; local-dev callers must set it themselves.

In: header

Header Parameters

org-id?string|null
x-user-id?string|null
x-request-id?string|null
traceparent?string|null
Idempotency-Key?|null

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://loading/v1/auth/token" \  -H "Content-Type: application/json" \  -d '{    "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5"  }'
{
  "data": {
    "access_token": "string",
    "token_type": "Bearer",
    "expires_in": 3600
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}