Skip to Content
WhatsApp API by Retention Stack

Sending messages

Text, media, locations, contacts, polls and replies.

All send endpoints are POST with a JSON body. With a session token the session is implied; with an account key add "session": "SESSION_NAME" to the body.

EndpointSends
/v1/sendTextText, with optional link preview
/v1/sendImageImage with optional caption
/v1/sendFileAny document (PDF, DOCX, …)
/v1/sendVideoVideo with optional caption
/v1/sendVoiceVoice note or audio
/v1/sendLocationLocation pin
/v1/sendContactVcardContact cards
/v1/sendPollPoll with 2–12 options
/v1/replyReply to a specific message

chatId formats

RecipientchatIdNotes
Person15551234567Country code and number, digits only
Group120363024802736123@g.usFrom the groups list
Channel120363024802736123@newsletterUse the ID from channel listing or creation unchanged
curl -X POST https://wp-rapidapi.retentionstack.agency/v1/sendText \
  -H "Authorization: Bearer ch_live_YOUR_SESSION_TOKEN" -H "Content-Type: application/json" \
  -d '{"chatId": "15551234567", "text": "Track it here: https://example.com/orders/42", "linkPreview": true}'

linkPreviewHighQuality: true uploads a sharper preview image, at the cost of an extra upload.

Media

Send a downloadable file.url, or base64 in file.data. Include mimetype and, for documents, filename.

curl -X POST https://wp-rapidapi.retentionstack.agency/v1/sendImage \
  -H "Authorization: Bearer ch_live_YOUR_SESSION_TOKEN" -H "Content-Type: application/json" \
  -d '{"chatId": "15551234567", "caption": "Your order receipt", "file": {"url": "https://your-server.example/receipt.png", "mimetype": "image/png", "filename": "receipt.png"}}'

Reply to a message

Pass the original message ID (from a webhook or message history) as reply_to:

{ "chatId": "15551234567", "text": "Yes, that works.", "reply_to": "true_15551234567@c.us_ABC123" }

Success means accepted, not delivered

A 200 means the message was accepted for sending. A number that is not on WhatsApp can still return success. Call check-exists before sending to new numbers, and confirm delivery with the message.ack webhook.

Every field for every endpoint is in the API reference.

Was this page helpful?

On this page