WAMANAGER

Search Documentation

Search through pages and content

Text Message

With Link Preview (preview_url: true)

Text Message with preview_url true

Example of a text message with link preview (shows thumbnail, title, and snippet).

When preview_url is set to true, WhatsApp automatically generates a rich preview for the first link found in the message body — including the website title, description, and thumbnail image.

cURL
curl -X POST '<BASE_URL>/api/whatsapp/text' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-d '{
  "contacts": [
    "<WHATSAPP_USER_PHONE_NUMBER>"
  ],
  "body": "As requested, here's the link to our latest product: https://www.meta.com/quest/quest-3/",
  "preview_url": true
}'

Without Link Preview (preview_url: false)

Text Message with preview_url false

Example of a plain text message without any link preview.

When preview_url is false, the link is sent as plain text only. The recipient sees the raw URL without a preview card. This is useful for clean, minimal messages or automated alerts.

cURL
curl -X POST '<BASE_URL>/api/whatsapp/text' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-d '{
  "contacts": [
    "<WHATSAPP_USER_PHONE_NUMBER>"
  ],
  "body": "As requested, here's the link to our latest product: https://www.meta.com/quest/quest-3/",
  "preview_url": false
}'

Text Formatting

WhatsApp supports limited text formatting in text messages. You can use specific markup characters to format your messages. These formatting characters need to be properly spaced to take effect. Text messages should be encoded in UTF-8 and support emojis. Note that emoji rendering is device-dependent and may appear differently across devices.

Formatting TypeWhatsApp SyntaxExample Input TextExample Rendered Output
Bold*text*
Your total is *$10.50*.
Your total is $10.50.
Italic_text_
Welcome to _WhatsApp_!
Welcome to WhatsApp!
Strikethrough~text~
This is ~better~ best!
This is better best!
Monospace```text```
```print 'Hello World';```
print 'Hello World';

Important Notes:

  • Formatting characters must be prefixed with a space character to take effect.
  • Text messages support a maximum of 4096 characters.
  • Line breaks can be added using \n (newline character).
  • Emoji support is device-dependent and may render differently across platforms.

Example with Multiple Formatting

cURL
curl -X POST '<BASE_URL>/api/whatsapp/text' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-d '{
  "contacts": [
    "<WHATSAPP_USER_PHONE_NUMBER>"
  ],
  "body": "Hello! Your order *#12345* is ready. Please visit _our store_ to pick it up. ~Old price~ New price: *$99.99*. Code: ```PICKUP2024```"
}'

Parameters

ParameterTypeDescriptionExample
ACCESS_TOKENString
Required
Whatsapp external api authorization token provided by business account.
ERYHCDIRMWORYFFEXESJDKR6SAZABA
CONTACTSArray
Required
Array of WhatsApp user phone numbers with country code.
["<WHATSAPP_USER_PHONE_NUMBER>"]
BODY_TEXTString
Required
Body text. URLs are automatically hyperlinked.
Maximum 4096 characters.
As requested, here's the link to our latest product: https://www.meta.com/quest/quest-3/
ENABLE_LINK_PREVIEWBoolean
Optional
Set to true to have the WhatsApp client attempt to render a link preview of any URL in the body text string.
Default: true
true