Sending Buttons

Before testing this API, make sure you have an active WhatsApp session. To get started, send your join code to the sandbox number Learn more

WhatsApp offers an API to send quick reply buttons to users. You can send up to a maximum of three buttons. To send more, consider using Sending Interactive Lists

POST https://gateway.lipachat.com/api/v1/whatsapp/interactive/buttons

Headers

Name
Value

Content-Type

application/json

apiKey

Get apiKey from App portal settings tabhttps://app.lipachat.com/app/settings

Body

Name
Type
Description

messageId

string

A unique identifier for the message. This will be used to track the message status and for deduplication purposes.

message

string

The message being sent.

from

string

Sandbox number +254110090747 or your own WABA phone number.

to

string

Receiver phone number. It should start with a country code.

buttons[0].id

string

Unique identifier of button in your app. eg 1 or YES_BTN

buttons[0].title

string

Text to be shown on button

"buttons" field is a list or array that accepts a minimum of 1 items and a maximum of 3 items.

curl --location 'https://gateway.lipachat.com/api/v1/whatsapp/interactive/buttons' \
--header 'apiKey: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
  "text": "Hello John Doe, are you interested to learn more about our products?",
  "buttons": [
    {
      "id": "1",
      "title": "YES"
    },
    {
      "id": "2",
      "title": "NO"
    },
    {
      "id": "3",
      "title": "Maybe"
    }
  ],
  "messageId": "875d25c2-0cb1-4270-a536-7b6dc16568b5",
  "to": "254XXXXX",
  "from": "254110090747"
}'

Response

{
      "timestamp": "2023-08-06T01:27:56.825898971",
      "data": {
            "messageId": "7addc006-07db-4fae-aac5-b285903b41d4",
            "waId": "wamid.HBgMMjU0NzE3NzQ2NTY1FQIAEnRgSRjJGRkMzNkQ0QUVENTIxQ0NBAA==",
            "status": "SENT",
            "statusDesc": "Message sent successfully"
      },
      "status": "success",
      "message": "",
      "errors": null
}

Last updated