Skip to main content
A conversation is the thread between one of your numbers (or RCS senders) and one contact on one channel. Every message you send and every reply you receive is attached to a conversation, so your team can read an exchange in order, see what is unanswered, and reply - from the API or from the console Inbox.

How conversations are created

You never create a conversation yourself. Vobiz finds or creates one for each unique combination of your number, the contact’s number and channel:
  • When you call Send a message, the message is attached to the conversation for that from, to and channel, creating it on first contact. The message object carries the thread’s conversationId.
  • When a contact sends a message to one of your numbers, Vobiz stores it with direction: "in" and status: "received" in the same thread, increments the thread’s unreadCount, and bumps lastMessageAt.
  • An RCS button tap is stored as an inbound message in the thread, carrying the button’s postbackData. See RCS.
  • STOP and other keyword replies are stored in the thread like any other inbound message, and additionally recorded as opt-outs.
Because the key includes the channel, an SMS exchange and an RCS exchange with the same contact are two conversations.

The conversation object

List conversations

List conversations returns a JSON array of conversation objects ordered by lastMessageAt, newest first. limit defaults to 20 (maximum 100) and offset pages through older threads.
cURL
Response - 200 OK
An account with no conversations receives [].

Get one conversation

Get a conversation returns a single object. An unknown id, a malformed id, or a thread that belongs to another account returns 404 {"error":"conversation not found"}.
cURL

Read the messages in a thread

List conversation messages returns a JSON array of message objects for the thread, in both directions. limit defaults to 50 (maximum 100); use offset for older messages.
Response - 200 OK
Inbound messages have direction: "in", status: "received", and from set to the contact. Outbound messages carry the statuses described in SMS statuses. To reply, call Send a message with from set to participantA and to set to participantB; the reply joins the same thread.

Mark a conversation as read

Mark a conversation read resets unreadCount to 0 and sets lastReadAt. It takes no body.
cURL
Response - 200 OK
Call it when an agent opens the thread in your own UI. An unknown id returns 404 {"error":"conversation not found"}.

Unread count

Unread count returns the total unread inbound messages across all your conversations - the number for an inbox badge.
cURL
Response - 200 OK

Get replies in real time

Polling the list works for low volumes. For a live inbox, use one of:
  • The message.received webhook event, delivered to your server with the inbound message object (including its conversationId).
  • The WebSocket, which pushes message.received for inbound messages and message.status for delivery updates to your outbound messages.

The console Inbox

In the Vobiz Console, SMS & RCS → Inbox shows the same conversations without code. Use SMS & RCS → Send to message a contact who has not written to you yet.

Before you go live

Messaging numbers

The numbers your threads run on.

Compliance overview

Register before two-way traffic goes live.

SMS

Two-way messaging and statuses.

Opt-outs

Keyword replies that are also recorded as opt-outs.

Webhooks

Push inbound messages to your server.

List messages

Query messages across all conversations by status, direction, tag or date.