API & developers
Send text and media through the API (inside the 24-hour window)
POST /api/v1/messages/send with type text, image, video, document or audio. Works only inside the customer's 24-hour window; otherwise you get 409 OUTSIDE_24H_WINDOW.
Last reviewed 9 November 2026
Besides templates, the API can send free text and media to any customer who messaged you in the last 24 hours. Each send costs the same ₹0.20 (or $0.004) platform fee as a template.
Request
POST https://payperwa.com/api/v1/messages/send
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"to": "919876543210",
"type": "text",
"text": "Your order #4821 has shipped."
}
To pick the number to send from, add the X-Channel-Id header (or channelId in the body); without it PayPerWA uses the number that has the open window with this customer.
For media set type to image, video, document or audio and pass a public media_url (plus caption, and filename for documents).
Meta's limits
- Text up to 4,096 characters.
- Image JPEG or PNG up to 5 MB. Video MP4 or 3GP up to 16 MB.
- Document PDF, Office files or TXT up to 100 MB. Audio AAC, AMR, MP3, M4A or OGG up to 16 MB (no caption).
Check the window first
GET https://payperwa.com/api/v1/messages/window?to=919876543210
Returns open, expires_at and can_send. Sending outside the window returns 409 OUTSIDE_24H_WINDOW and nothing is charged. Use a template to re-open the conversation. A contact who opted out gets nothing: the API answers 403 CONTACT_OPTED_OUT, also without a charge.
Full reference with code samples: API documentation.
Still stuck?
Chat with a person on WhatsApp or raise a ticket with a screenshot. We reply on every ticket by email.