“API: conversations and messages”
List conversations by status or contact, read one, and page through its messages with delivery status.
List conversations — GET /api/v1/conversations
Scope: conversations:read. Newest first, paginated. Each conversation embeds its contact and tags.
| Query | Values |
|---|---|
status | open, pending, closed |
contact_id | A contact ID |
limit, cursor | Pagination |
Read one — GET /api/v1/conversations/{id}
Scope: conversations:read. Returns 404 for another workspace’s conversation.
Messages — GET /api/v1/conversations/{id}/messages
Scope: messages:read. Newest first, paginated. Each message includes:
| Field | Meaning |
|---|---|
direction | inbound (from the customer) or outbound (from you) |
status | Delivery state: sending, sent, delivered, read, failed |
whatsapp_message_id | Meta’s wamid.… |
content_* | The text, media and template fields of the message |
curl "https://app.vatli.co/api/v1/conversations/CONVERSATION_ID/messages?limit=20" \
-H "Authorization: Bearer vatli_live_xxx"
For real-time updates instead of polling, subscribe to message.received and the delivery events with webhooks.