Messages

Send messages from your product through WhatsApp, Instagram, Messenger, email, or web chat. Use a template to start WhatsApp conversations and the email endpoint to start or reply to a thread. You can also send messages to internal chats or give an agent instructions.

If you schedule a send with delay or scheduleTime, use its messageId to read, reschedule or cancel it.

Example

await platic.messages.send({
  channelId: "wb-123",
  conversationId: "5215512345678",
  content: "Your order is on its way.",
});

What you need to know

  • Every error under /v1/messages uses the standard format, with a details.code. See Errors.
  • To start a WhatsApp conversation you need a template; once the contact replies you can send any message while the service window is open.
  • Sends with delay or scheduleTime are accepted but not yet sent; manage them with scheduled messages.

Endpoints

MethodEndpointDescription
POST/v1/messages/templateStart or reopen WhatsApp with a template
POST/v1/messages/emailStart or reply to an email thread
POST/v1/messagesStep into a conversation or instruct the agent
GET/v1/messages/scheduledList scheduled messages
GET/v1/messages/scheduled/{messageId}Get a scheduled message
PATCH/v1/messages/scheduled/{messageId}Reschedule a message
DELETE/v1/messages/scheduled/{messageId}Cancel a message
GET/v1/whatsapp/templatesList templates, with filters by status, category and name
GET/v1/whatsapp/templates/{name}Get the detail of one template
GET/v1/whatsapp/templates/{name}/analyticsSee sent, delivered, read, clicks and cost of a template
POST/v1/whatsapp/templatesCreate a template and send it to Meta for review
PATCH/v1/whatsapp/templates/{name}Edit one language version of a template
DELETE/v1/whatsapp/templates/{name}Delete a template, with all its languages or just one

Permissions

Reading, creating and editing templates requires the Conversations module or the Campaigns module. Deleting them requires Campaigns.