Skip to content

Case messaging

Every case has a message thread between the practice and the specialists on the case. Thea’s care team occasionally posts too.

Terminal window
curl "$THEA_API/cases/a1f3c9e27b4d4e0f9c6b2d8e5f7a1c3b/messages" \
-H "Authorization: Bearer $THEA_PARTNER_KEY" \
-H "Thea-Practice-Key: $THEA_PRACTICE_KEY"
Response
{
"data": [
{
"id": "88101",
"case_id": "a1f3c9e27b4d4e0f9c6b2d8e5f7a1c3b",
"body": "Reasonable to start metoprolol succinate 25 mg daily. Repeat Holter in 3 months; refer in person if burden stays above 10%.",
"sender": { "type": "specialist", "id": "3051", "name": "Dr. Priya Shah", "via": null },
"files": [],
"created_at": "2026-11-04T16:02:45Z"
}
],
"has_more": false,
"next_cursor": null
}

A case has one chronological conversation, with no reply-to or nested threads. Messages are oldest first and paginated. sender.type is:

Value Who
provider A clinician at the practice.
staff Practice staff.
specialist A specialist answering the case.
support Thea’s care team.

For provider and staff, sender.id is their roster id. sender.via is your partner name when a message was posted through the API, otherwise null. More sender types may be added; show unknown ones with the sender’s name. Files posted in the thread are in each message’s files; download them with GET /files/{file_id}.

Terminal window
curl -X POST "$THEA_API/cases/a1f3c9e27b4d4e0f9c6b2d8e5f7a1c3b/messages" \
-H "Authorization: Bearer $THEA_PARTNER_KEY" \
-H "Thea-Practice-Key: $THEA_PRACTICE_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: msg-acme-77120" \
-d '{
"body": "Thanks. Her TSH came back normal at 1.9 if that changes anything.",
"author_provider_id": "2214"
}'

The message is posted as the case’s requesting provider unless you set author_provider_id to the roster id of another active provider or staff member in the practice, as this example does for a staff member. Admins can’t post. Specialists see the message in Thea immediately, labelled “via” your partner name, and get Thea’s usual notification.

  • body is plain text, up to 20,000 characters.
  • To share a document, upload it to the case with POST /cases/{case_id}/files. It’s posted in the thread like a file attached in Thea.
  • You can’t post to a closed case (409 case-closed). Reopen it first.