Skip to content

Send a WhatsApp Message

POST /v1/whatsapp/send

Sends a WhatsApp message via a connected session. You must first create and connect a WhatsApp session by scanning the QR code (see Sessions).

Authentication

HeaderTypeRequiredDescription
AuthorizationstringYesBearer sk_live_YOUR_API_KEY
Idempotency-KeystringNoA unique UUIDv4 to prevent duplicate deliveries on network retries.

Request Body

Send an application/json payload with the following parameters:

ParameterTypeRequiredDescription
session_idintegerYesThe ID of the WhatsApp session to send from. Get this from GET /v1/whatsapp/sessions.
tostringYesThe destination WhatsApp number (e.g., 250788000000 or +250788000000).
contentstringYesThe text content of the message.
typestringNoMessage type. Enum: text, image, video, audio, document, location, contact. Defaults to text.

Example: Send a Text Message

bash
curl -X POST https://sendapi.co/v1/whatsapp/send \
  -H "Authorization: Bearer sk_live_123456789" \
  -H "Content-Type: application/json" \
  -d '{
    "session_id": 8,
    "to": "250788000000",
    "content": "Hello! How can our support team assist you today?"
  }'
javascript
import { SendAPI } from '@sendapi/node';

const client = new SendAPI('sk_live_123456789');

const response = await client.whatsapp.send({
  session_id: 8,
  to: '250788000000',
  content: 'Hello! How can our support team assist you today?'
});

console.log(response.data.id);
python
response = client.whatsapp.send(
    session_id=8,
    to="250788000000",
    content="Hello! How can our support team assist you today?"
)

Response

Returns a message object with delivery details from the WhatsApp sidecar.

json
{
  "success": true,
  "data": {
    "id": 14,
    "user_id": 34,
    "wa_session_id": 8,
    "direction": "out",
    "recipient": "250788000000",
    "type": "text",
    "content": "Hello! How can our support team assist you today?",
    "status": "sent",
    "external_id": "3EB0C5E64689ED4B8C686E",
    "created_at": "2026-04-16T23:31:57.000000Z",
    "sidecar": {
      "message_id": "3EB0C5E64689ED4B8C686E",
      "session_id": "wa_34_1774206887_cdd5cd",
      "to": "250788000000",
      "type": "text",
      "status": "sent",
      "timestamp": "2026-04-16T23:31:57.030Z"
    }
  },
  "meta": {
    "request_id": "9b84375a-5c4b-46e3-9542-c992a952897c",
    "timestamp": "2026-04-16T23:31:57.086770Z"
  }
}

Message Statuses

StatusDescription
sentMessage delivered to WhatsApp servers
deliveredReceived on recipient's device (double checkmark)
readOpened by recipient (blue checkmark)
failedDelivery failed

Session Required

You must have an active, connected WhatsApp session before sending messages. If your session is disconnected, reconnect it by scanning the QR code via GET /v1/whatsapp/sessions/{id}/qr.

Phone Notifications

Connecting a WhatsApp session acts as a linked device (like WhatsApp Web). This may reduce notifications on your phone for incoming messages. For production use, we recommend using a dedicated phone number rather than your personal number.

Released under the MIT License.