Send WhatsApp messages with an API, from your own number
One POST request sends a text, a file, a button message or a location to any WhatsApp number, group or channel. No template approval, no conversation window and no per-message fees.
- POST /sendMessage
- text · media · buttons
- groups & channels
- delivery receipts
curl -X POST "https://api.maytapi.com/api/$PID/$PHONE_ID/sendMessage" \
-H "x-maytapi-key: $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"to_number": "1415xxxxx67",
"type": "text",
"message": "Your order #10482 has shipped."
}'const res = await fetch(`https://api.maytapi.com/api/${PID}/${PHONE_ID}/sendMessage`, {
method: "POST",
headers: { "x-maytapi-key": TOKEN, "Content-Type": "application/json" },
body: JSON.stringify({ to_number: "1415xxxxx67", type: "text", message: "Your order #10482 has shipped." })
});
console.log(await res.json());import requests
res = requests.post(
f"https://api.maytapi.com/api/{PID}/{PHONE_ID}/sendMessage",
headers={"x-maytapi-key": TOKEN},
json={"to_number": "1415xxxxx67", "type": "text", "message": "Your order #10482 has shipped."},
timeout=10,
)
print(res.json())$ch = curl_init("https://api.maytapi.com/api/$PID/$PHONE_ID/sendMessage");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["x-maytapi-key: $TOKEN", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode(["to_number" => "1415xxxxx67", "type" => "text", "message" => "Your order #10482 has shipped."]),
]);
echo curl_exec($ch);
What you can send with the WhatsApp API
Change the type field and the same endpoint sends something else.
-
type: text
Text
Order updates, reminders, OTP codes and replies, with WhatsApp formatting.
-
type: media
Images, video, files
Send by URL or base64: invoices, photos, voice notes and documents up to WhatsApp's limits.
-
type: buttons
Buttons and lists
Quick replies, links, call buttons, copy-code buttons, lists and carousels.
-
type: location
Location and contacts
Share a pin, a vCard or a WhatsApp contact card.
Send a WhatsApp message in one request
Put your token in the x-maytapi-key header and post a JSON body with the recipient and the message. The API queues the message on your number and returns its id right away.
- ✓to_number in international format, e.g. 1415xxxxx67
- ✓Works from any language that can make an HTTP request
- ✓The response includes the message id for tracking
curl -X POST "https://api.maytapi.com/api/$PID/$PHONE_ID/sendMessage" \
-H "x-maytapi-key: $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"to_number": "1415xxxxx67",
"type": "text",
"message": "Your order #10482 has shipped."
}'const res = await fetch(`https://api.maytapi.com/api/${PID}/${PHONE_ID}/sendMessage`, {
method: "POST",
headers: { "x-maytapi-key": TOKEN, "Content-Type": "application/json" },
body: JSON.stringify({ to_number: "1415xxxxx67", type: "text", message: "Your order #10482 has shipped." })
});
console.log(await res.json());import requests
res = requests.post(
f"https://api.maytapi.com/api/{PID}/{PHONE_ID}/sendMessage",
headers={"x-maytapi-key": TOKEN},
json={"to_number": "1415xxxxx67", "type": "text", "message": "Your order #10482 has shipped."},
timeout=10,
)
print(res.json())$ch = curl_init("https://api.maytapi.com/api/$PID/$PHONE_ID/sendMessage");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["x-maytapi-key: $TOKEN", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => json_encode(["to_number" => "1415xxxxx67", "type" => "text", "message" => "Your order #10482 has shipped."]),
]);
echo curl_exec($ch);Send files, images and voice notes
Pass a public URL or a base64 string. Add a caption, a file name or HD quality for images.
- ✓PDF invoices and documents with a file name
- ✓Images and video with a caption
- ✓Stickers, voice notes and audio
curl -X POST "https://api.maytapi.com/api/$PID/$PHONE_ID/sendMessage" \
-H "x-maytapi-key: $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"to_number": "1415xxxxx67@c.us",
"type": "media",
"message": "https://example.com/invoice-10482.pdf",
"text": "Your invoice for order #10482",
"filename": "invoice-10482.pdf"
}'curl -X POST "https://api.maytapi.com/api/$PID/$PHONE_ID/sendMessage" \
-H "x-maytapi-key: $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"to_number": "1415xxxxx67@c.us",
"type": "media",
"message": "https://example.com/product.jpg",
"text": "New arrival",
"isHd": true
}'Send buttons people can tap
Customers answer with one tap and the reply arrives at your webhook with the button id, so your code knows exactly what was chosen.
- ✓Quick-reply, URL, call and copy-code buttons
- ✓Lists with sections for menus
- ✓No template approval for any of them
curl -X POST "https://api.maytapi.com/api/$PID/$PHONE_ID/sendMessage" \
-H "x-maytapi-key: $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"to_number": "1415xxxxx67@c.us",
"type": "buttons",
"message": "Your order #10482 has shipped. Want to follow it?",
"buttons": [
{
"id": "track",
"text": "Track order"
},
{
"id": "address",
"text": "Change address"
}
]
}'Send to groups and channels
Use a group id or a channel id as the recipient. The official Cloud API does not offer channels at all.
- ✓Group ids end with @g.us
- ✓Channel ids end with @newsletter
- ✓Mention participants, send polls and events
curl -X POST "https://api.maytapi.com/api/$PID/$PHONE_ID/sendMessage" \
-H "x-maytapi-key: $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"to_number": "120363012345678901@g.us",
"type": "text",
"message": "Weekly update: all orders shipped."
}'curl -X POST "https://api.maytapi.com/api/$PID/$PHONE_ID/sendMessage" \
-H "x-maytapi-key: $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"to_number": "120363204759413821@newsletter",
"type": "text",
"message": "New collection is live."
}'What businesses send through the API
-
Order and shipping updates
Confirmation, shipment and delivery messages straight from your store or ERP.
-
Reminders and confirmations
Appointment reminders with confirm and cancel buttons.
-
Support replies
Answer from your CRM or let your team reply from the shared inbox.
Sending messages FAQ
Ask our support team anything over WhatsApp. Average response time is under 24 hours.
Help center →Can I send WhatsApp messages without templates?
Yes. Maytapi sends free-form messages from your own number, so there is no template approval and no 24-hour window.
Can I send bulk messages?
You can send as many messages as you need, with no per-message fees. To protect the number, send to people who expect your messages, vary the content and keep a natural pace; Safe Mode warms up new numbers.
Which number do the messages come from?
From your own WhatsApp number, the one you pair with a QR code. Customers see your name and photo as usual.
How do I know a message was delivered?
Set a webhook and you receive sent, delivered and read events for every message. You can also check the queue and the phone status through the API.
Which languages can I use?
How much does sending cost?
Nothing per message. You pay a flat price per connected number: from $24 per month billed annually, or $29 billed monthly.
More WhatsApp API features

Get your key, send your first message in ten minutes
No approval, no templates, no card. Every endpoint is open for three days.