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,toandchannel, creating it on first contact. The message object carries the thread’sconversationId. - When a contact sends a message to one of your numbers, Vobiz stores it with
direction: "in"andstatus: "received"in the same thread, increments the thread’sunreadCount, and bumpslastMessageAt. - 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.
The conversation object
List conversations
List conversations returns a JSON array of conversation objects ordered bylastMessageAt, newest first. limit defaults to 20 (maximum 100) and offset pages through older threads.
cURL
Response - 200 OK
[].
Get one conversation
Get a conversation returns a single object. An unknown id, a malformed id, or a thread that belongs to another account returns404 {"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
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 resetsunreadCount to 0 and sets lastReadAt. It takes no body.
cURL
Response - 200 OK
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.receivedwebhook event, delivered to your server with the inbound message object (including itsconversationId). - The WebSocket, which pushes
message.receivedfor inbound messages andmessage.statusfor 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.
Related
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.