Start an AI Coach chat
curl --request POST \
--url https://sandbox.rx.tera.health/v1/patient/ai-coach/conversations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"title": "Dinner ideas"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({title: 'Dinner ideas'})
};
fetch('https://sandbox.rx.tera.health/v1/patient/ai-coach/conversations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sandbox.rx.tera.health/v1/patient/ai-coach/conversations"
payload = { "title": "Dinner ideas" }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "0190f5cc-3c4d-7e5f-8061-7a8b9c0d1e23",
"title": "Dinner ideas",
"created_at": "2026-10-26T11:00:00Z",
"last_message_at": null
}AI Coach
Start an AI Coach chat
Opens a new chat. The AI Coach remembers confirmed preferences across chats.
Plans: AI + health and fitness coaches (ai_health_fitness), AI only (ai_only).
POST
/
v1
/
patient
/
ai-coach
/
conversations
Start an AI Coach chat
curl --request POST \
--url https://sandbox.rx.tera.health/v1/patient/ai-coach/conversations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"title": "Dinner ideas"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({title: 'Dinner ideas'})
};
fetch('https://sandbox.rx.tera.health/v1/patient/ai-coach/conversations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sandbox.rx.tera.health/v1/patient/ai-coach/conversations"
payload = { "title": "Dinner ideas" }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "0190f5cc-3c4d-7e5f-8061-7a8b9c0d1e23",
"title": "Dinner ideas",
"created_at": "2026-10-26T11:00:00Z",
"last_message_at": null
}Authorizations
A 15-minute token bound to one patient and one enrollment, issued by POST /v1/oauth/token with the
token-exchange grant. Treat it as opaque. When it expires, exchange a fresh assertion; there is no refresh token.
Headers
A unique key per logical request, for example a UUID. Retrying with the same key and the same body
within 24 hours returns the first response (with Idempotent-Replayed: true) instead of creating a duplicate.
The same key with a different body is refused with 422 idempotency_key_reused.
Required string length:
8 - 255Body
application/json
Maximum string length:
120Example:
"Dinner ideas"

