New Safe Mode warms up new numbers to cut the risk of a WhatsApp ban. Learn more →

Maytapi/Docs/Send messages

Send messagesOne endpoint for every message type

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."
  }'
Message logs in the Maytapi console next to the WhatsApp messages they belong to
Message types

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.

One request

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."
  }'
Media

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"
  }'
Interactive

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
buttons
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"
      }
    ]
  }'
Groups & channels

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."
  }'
Use cases

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.

FAQ

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?

Any language that can send an HTTP request. There are step-by-step guides for Python, Node.js, PHP, Java and C#. Step-by-step guides: Node.js, Python, PHP, Java, C#.

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.

Start using the WhatsApp API

Get your key, send your first message in ten minutes

No approval, no templates, no card. Every endpoint is open for three days.