Skip to content
WaaruDocs

Choose a WhatsApp API message format

Build Waaru Developer API payloads for text, templates, linked media, interactive buttons and lists, locations, and one contact card with the supported field limits.

Reviewed

Every outbound format uses POST /v1/messages. Send messaging_product: "whatsapp", a valid E.164 to number with country code, and the matching type and content object. You may also set recipient_type: "individual". Unknown fields are rejected.

Before using these examples, set up authentication and follow the first message request.

Supported types

typeRequired contentLimits and optional fields
texttext.body1 to 4,096 characters; optional boolean preview_url.
templatetemplate.name, template.language.codeOptional components matching the approved template. See template example.
imageimage.linkOptional caption, up to 1,024 characters.
videovideo.linkOptional caption, up to 1,024 characters.
audioaudio.linkNo caption field.
documentdocument.linkOptional caption up to 1,024 characters and filename up to 240 characters.
interactiveinteractive.type, body, actionSupported interactive types are button and list; examples below.
locationlocation.latitude, location.longitudeLatitude -90 to 90; longitude -180 to 180. Optional name and address, each up to 1,000 characters.
contactsExactly one entry in contacts with name.formatted_nameOptional name parts, phones, emails, URLs, and organization.

The JSON request limit is 262,144 bytes. The API checks message structure before admission. Meta can still reject content that does not meet the selected format or approved template requirements. These examples are payload shapes, not pre-approved messages or live media assets.

Send linked media

{
  "messaging_product": "whatsapp",
  "to": "+919876543210",
  "type": "document",
  "document": {
    "link": "https://example.com/files/product-guide.pdf",
    "caption": "The product guide you requested.",
    "filename": "product-guide.pdf"
  }
}

For an image or video, replace type and the content key with image or video. For audio use audio with only link.

Use a public HTTPS URL on port 443 with a hostname. Embedded credentials, URL fragments, IP-address URLs, localhost, and private local hostnames are rejected. Use an actual accessible file in the required format. The external API does not upload files or accept a Meta media ID in place of link. Inbound attachments are downloaded separately.

Offer reply buttons

{
  "messaging_product": "whatsapp",
  "to": "+919876543210",
  "type": "interactive",
  "interactive": {
    "type": "button",
    "body": { "text": "Which team can help?" },
    "action": {
      "buttons": [
        { "type": "reply", "reply": { "id": "sales", "title": "Sales" } },
        { "type": "reply", "reply": { "id": "support", "title": "Support" } }
      ]
    }
  }
}

Use one to three buttons. Each reply ID allows up to 256 characters; each title up to 20. The body allows up to 1,024 characters. Optional text header uses { "type": "text", "text": "Heading" } with up to 60 characters. Optional footer uses { "text": "Footer" } with up to 60 characters.

Offer a list

{
  "messaging_product": "whatsapp",
  "to": "+919876543210",
  "type": "interactive",
  "interactive": {
    "type": "list",
    "body": { "text": "Choose the information you need." },
    "action": {
      "button": "View options",
      "sections": [
        {
          "title": "Product help",
          "rows": [
            {
              "id": "sizing",
              "title": "Size guide",
              "description": "Find the right fit."
            }
          ]
        }
      ]
    }
  }
}

Use one to ten sections and at most ten rows across the whole list. Each row requires id (up to 200 characters) and title (up to 24); optional description allows 72. The action button allows 20 characters. Section titles allow 24. Header, body, and footer limits match reply-button messages.

Send a location

{
  "messaging_product": "whatsapp",
  "to": "+919876543210",
  "type": "location",
  "location": {
    "latitude": 12.9716,
    "longitude": 77.5946,
    "name": "Example meeting point",
    "address": "Replace with your actual address."
  }
}

Send one contact card

{
  "messaging_product": "whatsapp",
  "to": "+919876543210",
  "type": "contacts",
  "contacts": [
    {
      "name": { "formatted_name": "Example support team" },
      "urls": [{ "url": "https://example.com/support", "type": "WORK" }]
    }
  ]
}

formatted_name allows 256 characters. Optional name fields are first_name, last_name, middle_name (128 each), prefix, and suffix (32 each). You may add up to three entries each for phones, emails, and urls. Each entry requires phone, email, or url respectively, with optional type; a phone entry may include wa_id. An optional org object accepts company, department, and title (256 each).

Match template components

Supported component types are header, body, and button. Button components may use sub_type of quick_reply, url, or copy_code with a string index. Each component has a parameters array.

Parameter types are text, currency, date_time, image, video, and document. Text, currency, and date/time parameters may include parameter_name when the approved template uses named variables. Currency needs fallback_value, a three-character code, and integer amount_1000; date/time needs fallback_value. Media parameters use a public HTTPS link, and document parameters may include filename. Match the approved template's exact parameter kinds and order; support for a component field does not mean every parameter is valid in every position.

Catalog messages, WhatsApp Flow forms, arbitrary interactive types, and extra Meta fields are not accepted by this external endpoint. Use only the formats above. See send and track messages for authentication, acceptance, and the safety checks that apply to every format.

On this page