Skip to content

Conversations

One thread per contact and number — the same data as the team inbox. Read history, reply, assign and resolve from your own systems.

Endpoints

The conversation object

JSON
{
  "id": "a81c…",
  "status": "open",
  "phone_number_id": "1c2d…",
  "assignee": { "id": "2b9d…", "name": "John" },
  "team_id": null,
  "csw_expires_at": "2026-11-12T10:45:11Z",
  "fep_expires_at": null,
  "last_message_at": "2026-11-11T10:45:11Z",
  "last_message_preview": "Is the blue one back in stock?",
  "last_direction": "in",
  "unread_count": 1,
  "snoozed_until": null,
  "bot_active": false,
  "created_at": "2026-10-02T14:20:00Z",
  "contact": { "id": "b1e7…", "name": "Jane Doe", "profile_name": "Jane", "phone": "14155550101", "username": null, "bsuid": "IN.1234567890", "opt_in": "opted_in" }
}
FieldMeaning
csw_expires_atWhen the 24-hour customer service window closes. After that, only templates can be sent.
fep_expires_atEnd of a free-entry-point window (72 hours after the customer arrives from a click-to-WhatsApp ad), when one applies
statusopen, pending, snoozed or resolved
bot_activeAn automation is currently handling the conversation

Listing conversations

Query parameters
  • statusstringoptional
    open, pending, snoozed, resolved or all.
  • assigneestringoptional
    me, unassigned, all or a user id.
  • phone_number_iduuidoptional
    Only this number.
  • contact_iduuidoptional
    Only this contact.
  • taguuidoptional
    Contacts with this tag.
  • unreadbooleanoptional
    true for conversations with unread messages.
  • qstringoptional
    Search contact name, profile name or phone.
  • cursor, limitstring, integeroptional
    Pagination (30 by default, up to 100).

The response also contains counts per status, for building inbox tabs.

Messages in a conversation

GET /v1/conversations/{id}/messages returns message objects, newest first. To load older messages, pass the next_cursor from the previous page as before.

Replying

POST /v1/conversations/{id}/messages takes the same body as POST /v1/messages without the recipient fields — the conversation decides the contact and number. It honours Idempotency-Key and returns 202 with the full message object.

POST /v1/conversations/{id}/messages
{ "type": "text", "text": { "body": "Yes — the blue variant is back in stock!" } }

Status and assignment

PATCH /v1/conversations/{id}
{ "status": "snoozed", "snoozed_until": "2026-11-12T04:30:00Z" }

Fields: status, snoozed_until, assignee_id, team_id. Changing status needs inbox:reply; assigning needs inbox:assign. Each change fires conversation.updated.

Something unclear or missing on this page? Tell us at contact@swastik.ai