Skip to main content
Sending a text message through the WhatsApp Cloud API uses type: "text". Text messages can contain plain text or URLs. When a URL is included, you can optionally turn on a URL preview that shows the link’s thumbnail, title, and description below the message.

Basic text message

{
  "messaging_product": "whatsapp",
  "to": "919959623255",
  "type": "text",
  "text": {
    "body": "Hello! How can I help you?"
  }
}
This works only inside the 24-hour customer service window — within 24 hours of the customer’s last message to you. Outside that window, plain text is blocked and you must send an approved template instead. See The 24-hour window.

URL preview — on vs off

When your message body contains a URL, WhatsApp can show a preview card with the website’s thumbnail, title, and description below the message text.
{
  "messaging_product": "whatsapp",
  "to": "919959623255",
  "type": "text",
  "text": {
    "preview_url": true,
    "body": "Check this: https://www.youtube.com"
  }
}
preview_urlResult
false (default)Plain text only, no card
trueWhatsApp fetches the URL and shows a preview card
Rule: The URL must be present in the body text. If there is no URL in the body, preview_url: true does nothing.
URL preview example
Link preview example

Frequently asked

Free text only works inside the 24-hour window after the customer last messaged you. Outside it, use an approved template. See The 24-hour window.
Most likely the 24-hour window has closed. If the customer’s last message is over 24 hours old, switch to a template message.
Check that the URL is actually in the body text. Also, the URL must be publicly accessible and return a valid page with Open Graph meta tags for WhatsApp to build the preview.
4096 characters.

Gotchas & common mistakes

  • 24-hour window is the #1 cause of failed text sends. Outside the window, use a template — not a text message.
  • preview_url does nothing without a URL in the body — the field is ignored if the body has no link.
  • Private or broken URLs — if the URL requires login or is down, WhatsApp cannot generate a preview. The message still sends, just without the card.
  • Body length limit — max 4096 characters.
  • messaging_product: "whatsapp" is required or the API call errors.