Thrive AI Health
Api reference

Create a workout plan (async generation)

Schedules an asynchronous generation job and returns immediately with `202 Accepted` plus a `job_id`. Generation builds the workouts under the plan from the supplied preferences, constraints, and coach-derived member insights. Creating a new plan marks the previous active plan inactive — only one plan is active at a time. Poll `GET /v1/users/{user_id}/jobs/{job_id}` for completion or consume the partner queue update event.

POST
/v1/users/{user_id}/workout-plans

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/workout-plans" \  -H "Content-Type: application/json" \  -d '{    "title": "string"  }'
{
  "data": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "job_id": "453bd7d7-5355-4d6d-a38e-d9e7eb218c3f",
    "status": "accepted"
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}