Send WhatsApp API Messages: Syntax, Types & Delivery Guide (2026)

Updated At: February 16, 2026
Read Time: 3 Minutes

​To send a WhatsApp API message, make a POST request to /<PHONE_NUMBER_ID>/messages. The JSON payload must include the messaging_product, recipient_type (usually "individual"), to number, and the specific type object (like "text" or "template"). Always include the country code in the phone number to avoid delivery errors.​

 

​Sending messages via API sounds easy. Until it breaks. One typo in the JSON payload and your campaign stalls.

 

​We found a specific behavior in the documentation that many developers miss. The API caches media links for 10 minutes. If you update an image on your server but keep the same URL, the API sends the old image. We solve this by appending a query string (like ?v=2) to the URL. This forces a refresh. Little details like this matter.

 

​Before you start coding, you must ensure you are on the right infrastructure. Reading The Real Difference Between WhatsApp Cloud API and On-Prem API (2025 Guide) will help you verify if your technical foundation supports the message types you need.

 

Key Concepts Covered in This Guide

 

  • Core Topic Entity: Send WhatsApp API Messages
  • Primary Problem Entity: Delivery Failure
  • Core Solution Entity: POST Message Endpoint
  • Supporting Sub-Entities: Message Types, 24-Hour Window, TTL
  • Desired Outcome: Automated Message Delivery

 

​Supported Message Types & Syntax

 

​You can send more than just text. The API supports rich, interactive formats.

 

​Standard text is fine. But interactive messages drive action.

 

​Send WhatsApp API Messages works with WhatsApp message types API to solve low engagement and achieve dynamic customer interactions.

 

​Here are the key types you can send:

 

  • Text Messages: Simple body text with an optional link preview.
  • Template Messages: Pre-approved formats for marketing, utility, and auth.
  • Interactive Messages: Buttons, lists, and flows. These guide the user.
  • Media Messages: Images, audio, video, and documents.

 

Example Syntax for a Text Message: To send a simple text, use this JSON structure. Note the recipient_type and type fields.

 

{
"messaging_product": "whatsapp",
  "recipient_type": "individual",
  "to": "+16505551234",
  "type": "text",
  "text": {
    "preview_url": true,
    "body": "Here is the link to our latest product."
  }
}
 

The 24-Hour Customer Service Window

 

​You cannot always send free-form messages. The clock is ticking.

 

​This is the most critical rule. When a user messages you, a 24-hour timer starts. This is the customer service window.

 

  • Window Open: You can send any message type. Text, audio, or video.
  • Window Closed: You can only send template messages.

 

​If you try to send a text message after 24 hours, it will fail. The API will reject it. To fix this, use a template to re-engage the user. Once they reply, the window opens again.

 

​Delivery Rules: Quality, TTL, and Caching 

 

​Delivery depends on quality scores and time limits.

 

​Sending the request is step one. Getting it delivered is step two.

 

  • Message Quality: Users vote with their block button. If your quality rating drops, your limits drop. Don't spam.
  • Time-To-Live (TTL): Messages don't live forever. By default, they expire after 30 days. If a user's phone is off for a month, the message drops. You can customize this for time-sensitive offers.
  • Media Caching: As mentioned, the API caches media for 10 minutes. Use a unique URL query string to bypass this if you need instant updates.

 

Conclusion

 

​Mastering the WhatsApp API requires precision. You must respect the syntax. You must respect the 24-hour window. And you must manage your message quality. Do this, and your automated messages will land every time.

 

​Simplify your messaging infrastructure with WUSeller. We handle the complex API rules so you can focus on your customers. Start for free today.

 

Frequently Asked Questions

​How do I send a text message using WhatsApp API?

Use the POST endpoint with type="text". Send a POST request to your phone number ID endpoint. In the JSON body, set the type to "text" and include a text object with your message body.

​Can I send messages outside the 24-hour window?

Only Template messages are allowed. Once the 24-hour customer service window closes, you cannot send free-form text or media messages. You must send an approved template message to re-open the conversation.

​Why is my WhatsApp API message not delivering?

Check quality rating or TTL expiration. Delivery fails for several reasons. Your phone number quality might be too low. The message Time-To-Live (TTL) might have expired. Or the user might have blocked you.

​What is the difference between template and interactive messages?

Templates are pre-approved; Interactive are dynamic session messages. Template messages (marketing, utility) must be approved by Meta and can be sent anytime. Interactive messages (lists, buttons) are for active conversations and do not need approval.

​How long does WhatsApp keep trying to send a message?

30 days default, or custom TTL. By default, WhatsApp attempts delivery for 30 days. You can shorten this using the Time-To-Live (TTL) field for time-sensitive codes or offers.