Skip to main content
POST

Overview

Save messages of a WhatsApp conversation so they appear in your WhatsApp logs. Messages are added to the conversation between the user’s number and your number; the conversation is created if it doesn’t exist yet. Only WhatsApp is supported.

Prerequisites

  • An API key for your workspace

Request

string
required
Your workspace API key. Create one from the profile menu in the dashboard → API Keys.
string
outbound or inbound. Can be sent in the query or in the body.
string
Must be whatsapp. Can be sent in the query or in the body.
string
required
The customer’s number.
string
required
Your WhatsApp number.
array[object]
The messages to add. Sent as is.
string
ID of the agent in the conversation.
string
Template name used in the conversation.
string
Related call ID.
string
Conversation or session ID.

Response

object
The stored conversation record.

Error Handling

Errors return status: false, with the reason in errorMessage.
  • 400 Bad Request
    • Valid msg_type (outbound/inbound) is required.
    • Only service=whatsapp is supported.
    • user_phone_number and api_phone_number are required.
  • 401 Unauthorized – Missing or invalid API key.
  • 429 Too Many Requests – More than 1,000 WhatsApp requests in 15 minutes from your IP address.
  • 500 Internal Server Error – Unexpected server error.