Components

v1

Here's a structured API documentation for sending WhatsApp Business messages, highlighting the required parameters for each message type and category, along with the meta responses:


Template Components

Templates are made up of four primary components which you define when you create a template: header, body, footer, and buttons. The components you choose for each of your templates should be based on your business needs. The only required component is the body component.

Some components support variables, whose values you can supply when using the Cloud API or On-Premises API to send the template in a template message. If your templates use variables, you must include sample variable values upon template creation.

Base URL

https://was.blendmedia.co.id/v1/

Authorization

Include an Authorization header with a valid access token:

Authorization: <API_KEY>

Request Parameters

Headers are optional components that appear at the top of template messages. Headers support text, media (images, videos, documents), and locations.

All templates are limited to one header component

Specifies the message's heading component. Options include:

  • Text Dynamic: Placeholder-based dynamic text.

    • Positional — Pass in an array of parameters that correspond to numeric positions in the body text with examples

      • For example: “Hello John, your account balance is {{1}}” | [ “$1,000” ]

  • Text Static: Plain text.

  • Media (Image, Video, Document): Attachments like images, videos, or documents.

Text Headers

"components": [
  {
    "type": "header",
    "parameters": [
      {
        "type": "<text>",
        "text": "<HEADER_TEXT>"
      }
    ]
  }
]
Placeholder
Description
Example Value

<HEADER_TEXT>

String | Required

Plain text string. Can support 1 parameter.

“Our Holiday sale starts December 1st!”

“Our new sale starts {{1}}”

Media Headers

Media headers can be an image, video, or a document such as a PDF.

"components": [
  {
    "type": "header",
    "parameters": [
      {
        "type": "<FORMAT>",
        "image|video|documents": { "link": "<URL>" }
      }
    ]
  }
]
Placeholder
Description
Example Value

<FORMAT>

Indicates media asset type. Set to IMAGE, VIDEO, or DOCUMENT.

IMAGE


Body

Main content of the message. Can include:

  • Static Text: Plain message text.

  • Dynamic Variables: Use placeholders like {{1}} for personalized content.

JSON Structure:

"components": [
  {
    "type": "body",
    "parameters": [
      { "type": "text", "text": "<Body Content (static or dynamic)>" }
    ]
  }
]

Buttons

Interactive elements for user actions:

  • Quick Reply: Predefined responses.

  • URL (Static/Dynamic): Opens a link.

  • Coupon Code: Allows users to copy a code.

  • WhatsApp Flow: Navigates to another workflow.

JSON Structure:

"components": [
  {
    "type": "button",
    "sub_type": "<quick_reply|url|copy_code|flow>",
    "index": "<0|1|...>" //For determine the position of the button
    "parameters": [
      { "type": "text", "text": "<Static or Dynamic URL>" },
      { "type": "coupon_code", "coupon_code": "<Coupon Code>" },
    ]
  }
]

Last updated