Thrive AI Health
Api reference

Create a custom health action

Create a partner-authored health action. Returns the created resource. For coach-authored actions, listen for `coach.nudge.created` events with `target.type="health_action"` instead — those are not produced via this endpoint.

POST
/v1/users/{user_id}/health-actions

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/health-actions" \  -H "Content-Type: application/json" \  -d '{    "title": "string",    "description": "string",    "scheduled_at": "2019-08-24T14:15:22Z"  }'
{
  "data": {
    "health_action_id": "eccd4d38-9aca-457f-af38-f6997b7f00d0",
    "title": "string",
    "description": "string",
    "status": "pending",
    "scheduled_at": "2019-08-24T14:15:22Z",
    "execution_options": {}
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}