Skip to content

Messaging

Unified inbox

One inbox holds your WhatsApp and phone-call conversations; Instagram, email and web chat are coming soon. A reply goes out on the conversation’s own channel.

GET/v1/api/platform/inbox/conversations

List conversations (cursor pagination, filter by status).

GET/v1/api/platform/inbox/conversations/:id/messages

Messages in a thread.

POST/v1/api/platform/inbox/conversations/:id/messages

Reply in a thread.

textstringOptional
Message text. Send text, media or both.
mediaobjectOptional
A file you uploaded: { key, mimeType, fileName }.

PATCH/v1/api/platform/inbox/conversations/:id/lead

Link the thread to an existing lead.

leadIdstringRequired
The lead to link.

POST/v1/api/platform/inbox/conversations/:id/read

Mark a thread as read.

GET/v1/api/platform/inbox/unread

Unread counts.

const { data: threads } = await ecod.product.erix.chat.conversations.list({
  status: "open",
  limit: 20,
});

await ecod.product.erix.chat.messages.send({
  conversationId: threads[0].id,
  text: "Thanks! Your quote is on the way.",
});

await ecod.product.erix.chat.conversations.linkLead(conversationId, leadId);