Interactive Messages

POST /api/external/messages/interactive

Auth: Authorization: Bearer ck_<api_key> (required)

Request parameters

FieldRequiredTypeDescription
phoneNumberIdYesstringWhatsApp phone number ID
toYesstringRecipient with country code
interactiveTypeYesstringbutton (1–3 buttons) or list
bodyTextYesstringMessage body (max 1024 characters)
headerTextNostringHeader text (max 60 characters)
footerTextNostringFooter text (max 60 characters)
buttonsIf buttonarray1–3 items: { id/payload, title/text } per button
sectionsIf listarrayList sections: { title, rows: [{ id, title, description? }] } (max 10 rows per section)
listButtonTextNostringList open button label (default View options, max 20 chars)
contextMessageIdNostringReply in thread to a prior message

Response example

{
  "success": true,
  "message": "Interactive message sent",
  "data": {
    "messageId": "wamid.HBgMOTE5ODc2NTQzMjEwFQIAERgSQjAwMDAwMDAwMDAwMDAwAA==",
    "conversationId": 1001,
    "interactiveType": "button"
  }
}

Code samples (button message)

curl -X POST https://chatyug.com/api/external/messages/interactive \
  -H "Authorization: Bearer ck_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "phoneNumberId": "100000000000001",
    "to": "919876543210",
    "interactiveType": "button",
    "bodyText": "How can we help you today?",
    "buttons": [
      { "id": "sales", "title": "Sales" },
      { "id": "support", "title": "Support" }
    ]
  }'
await axios.post('https://chatyug.com/api/external/messages/interactive', {
  phoneNumberId: '100000000000001',
  to: '919876543210',
  interactiveType: 'button',
  bodyText: 'How can we help you today?',
  buttons: [
    { id: 'sales', title: 'Sales' },
    { id: 'support', title: 'Support' }
  ]
}, { headers: { Authorization: 'Bearer ck_your_api_key_here' } });
requests.post('https://chatyug.com/api/external/messages/interactive', json={
    'phoneNumberId': '100000000000001',
    'to': '919876543210',
    'interactiveType': 'button',
    'bodyText': 'How can we help you today?',
    'buttons': [
        {'id': 'sales', 'title': 'Sales'},
        {'id': 'support', 'title': 'Support'}
    ]
}, headers={'Authorization': 'Bearer ck_your_api_key_here'})
$client->post('https://chatyug.com/api/external/messages/interactive', [
    'headers' => ['Authorization' => 'Bearer ck_your_api_key_here'],
    'json' => [
        'phoneNumberId' => '100000000000001',
        'to' => '919876543210',
        'interactiveType' => 'button',
        'bodyText' => 'How can we help you today?',
        'buttons' => [
            ['id' => 'sales', 'title' => 'Sales'],
            ['id' => 'support', 'title' => 'Support']
        ]
    ]
]);
Related webhook: When the customer taps a button or list row, you receive eventType: message with interactive.button_reply or interactive.list_reply in the Meta message object.