Thrive AI Health
Api reference

Register an uploaded lab and schedule processing

Two-step upload flow — the partner first calls `POST /v1/uploads` to mint a pre-signed PUT URL, uploads the file to that URL, then calls this endpoint with the returned `file_url`. Returns `202 Accepted` with a partner-facing `lab_result_id` and the Temporal `workflow_id` driving extraction + analysis. Processing runs asynchronously; partners poll either `GET /v1/users/{user_id}/labs/{lab_result_id}` (status transitions: `pending` → `processing` → `ready` / `failed`) or `GET /v1/users/{user_id}/jobs/{job_id}` (raw Temporal workflow state). Both round-trip through the same execution. If the workflow start fails, the row stays in `pending` and `workflow_id` is `null`; partners should retry the upload.

POST
/v1/users/{user_id}/labs/upload

Authorization

MemberBearer
AuthorizationBearer <token>

Member-scoped JWT minted by POST /v1/auth/token. Required on every /v1/users/{user_id}/... route; the token's sub claim must match the path user_id.

In: header

Path Parameters

user_id*User Id
Formatuuid

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/users/497f6eca-6276-4993-bfeb-53cbbbba6f08/labs/upload" \  -H "Content-Type: application/json" \  -d '{    "file_url": "string"  }'
{
  "data": {
    "lab_result_id": "f0d3eac0-9599-4eef-977f-96a8777c2dd8",
    "status": "pending",
    "workflow_id": "string"
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}