v1

latestOpenAPI 3.0.02026-07-2483164186.3 KB
Broadcast Groups

Send Template Whatsapp Message to Broadcast Group

Send a template WhatsApp message to a broadcast group. When using placeholders in your message, please follow the format outlined below:

  • {{Name}}: Used to include the name of the customer.
  • {{Phone Number}}: Used to include the phone number of the customer.
  • {{<Custom Field Name>}}: Used to include custom fields. This will only function correctly if the custom field has been set for all customers within the broadcast group.
post/whatsapp/message/broadcast

Request body

groupNamestring required

The name of the WhatsApp group to send the message to

fromstring phone

The phone number from which the message is sent, with the country code

Example request

{
  "groupName": "Test Group",
  "from": "+919999999999",
  "content": {
    "templateName": "template_name",
    "language": "en",
    "templateData": {
      "header": {
        "type": "TEXT",
        "placeholder": "Header text",
        "mediaUrl": "https://example.com/image.png",
        "filename": "Document caption",
        "latitude": -23.5505199,
        "longitude": -46.6333094
      },
      "body": {
        "placeholders": [
          "Body text"
        ]
      },
      "buttons": [
        {
          "type": "URL",
          "parameter": "Button text"
        }
      ],
      "cards": [
        {
          "components": {
            "header": {
              "type": "IMAGE",
              "mediaUrl": "https://example.com/image.png"
            },
            "body": {
              "placeholders": [
                "Body text"
              ]
            },
            "buttons": [
              {
                "type": "URL",
                "parameter": "Button text"
              }
            ]
          }
        }
      ]
    }
  }
}

Response

OK

status'SENT' | 'FAILED' required

The status of the sent message (SENT or FAILED)

messageIdstring required

The ID of the sent message

errorMessagestring

The error message in case of a failed message

Example response

{
  "status": "SENT",
  "messageId": "uuid-v4",
  "errorMessage": "Sample Error"
}