API Reference
Conversations
Access conversation history and messages.
Overview
A conversation is one thread between a customer and a bot on a channel, with an ordered list of messages. Every conversation belongs to a bot and is scoped to your tenant. Read access needs the conversations:read scope; status changes, AI drafts, and the auto-reply toggle need conversations:write. Both a dashboard JWT and a cm_ API key work.
List & filter
curl "https://api.callmissed.com/api/v1/conversations?channel=whatsapp&status=active" \
-H "Authorization: Bearer cm_your_key"[
{
"id": "c0ffee00-1111-2222-3333-444455556666",
"tenant_id": "a0b1c2d3-4455-6677-8899-aabbccddeeff",
"bot_id": "b1f2c3d4-5678-90ab-cdef-1234567890ab",
"channel": "whatsapp",
"external_id": "+919876543210",
"status": "active",
"duration_seconds": null,
"metadata": null,
"ai_autoreply_enabled": true,
"created_at": "2026-06-06T11:55:00Z",
"updated_at": "2026-06-06T12:01:00Z",
"bot_name": "Support Bot"
}
]Messages
GET /api/v1/conversations/:id/messages returns the thread in order:
[
{ "id": "...", "conversation_id": "c0ffee00-...", "role": "user", "content": "Where is my order?", "message_type": "text", "tokens_used": null, "created_at": "2026-06-06T11:55:00Z" },
{ "id": "...", "conversation_id": "c0ffee00-...", "role": "assistant", "content": "Let me check that for you.", "message_type": "text", "tokens_used": 18, "created_at": "2026-06-06T11:55:02Z" }
]Human-in-the-loop
POST /api/v1/conversations/:id/ai-draftreturns a suggested reply ({ "draft": "..." }) without sending it — useful for an agent co-pilot.POST /api/v1/conversations/:id/autoreplywith{ "enabled": false }pauses AI auto-replies on a single thread so a human can take over.PUT /api/v1/conversations/:id/statusmoves a thread betweenactive,completed,escalated, andfailed.
/api/v1/conversations AuthList conversations
Query Parameters
channelwhatsapp | voicestatusactive | completed | escalated | failedbot_idUUID/api/v1/conversations/:id AuthGet conversation details
/api/v1/conversations/:id/messages AuthGet all messages in a conversation
/api/v1/conversations/:id/status AuthUpdate conversation status
Request Body
statusactive | completed | escalated | failed/api/v1/conversations/:id/ai-draft AuthGenerate an AI co-pilot reply draft (does not send)
/api/v1/conversations/:id/autoreply AuthToggle per-thread AI auto-reply
Request Body
enabledboolean/ws/conversations?token=JWT AuthReal-time conversation events for the dashboard (JWT in query param)