Post Thread Message
Send a claimant reply into a thread.
Channel honoring: the reply is routed to the channel of the most recent agent message in the thread (sms / email / web_chat). Voice falls back to web_chat — we cannot dynamically dial out from a synchronous HTTP POST. The agent's response is then delivered via the corresponding channel adapter (SMS via Twilio, email via Resend, web via the inbox refresh) so the claimant continues in their preferred channel.
Async dispatch (item #16): the endpoint persists the new Conversation row, then enqueues process_turn as a background asyncio task and returns 202 Accepted immediately. The agent reply is delivered to the client via the existing /threads/{id}/stream SSE endpoint within ~1.5s. The previous synchronous code path is gone — keep one path, not two. A task crash leaves the user message + Conversation row durable; the orphan janitor in conversations/background.py sweeps inbound conversations stuck in scheduled / in_progress past CONVERSATION_ORPHAN_THRESHOLD_SECONDS (default 5 min) and marks them status='failed' with the existing delivery_status badge so the user sees the failure and can retry.
Auth model:
- Claimants: may only post to their own threads (person_id match).
- Staff: NOT permitted in v1. Staff impersonation / on-behalf-of posting is desirable but out of scope; returns 403. Track as a follow-up when staff takeover UX lands for the inbox.
Request
- Base URL: https://api.claims.zicron.ai
- URL: https://api.claims.zicron.ai/v1/threads/{thread_id}/messages
- Auth: none declared
Path parameters
Request body
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.