Skip to main content

Buttons

await client.messages.sendInteractiveButtons({
  phoneNumberId: '123',
  to: '56961567267',
  bodyText: 'Pick an option',
  buttons: [
    { id: 'accept', title: 'Accept' },
    { id: 'decline', title: 'Decline' }
  ],
  header: { type: 'text', text: 'Confirm your choice' },
  footerText: 'Reply with a button'
});

Lists

await client.messages.sendInteractiveList({
  phoneNumberId: '123',
  to: '56961567267',
  bodyText: 'Choose a category',
  buttonText: 'View options',
  sections: [
    {
      title: 'Main menu',
      rows: [
        { id: 'opt1', title: 'Option 1', description: 'First option' },
        { id: 'opt2', title: 'Option 2', description: 'Second option' }
      ]
    }
  ]
});

Products

Single product

await client.messages.sendInteractiveProduct({
  phoneNumberId: '123',
  to: '56961567267',
  catalogId: 'CAT123',
  productRetailerId: 'SKU-1',
  bodyText: 'Check out this product'
});

Product list

await client.messages.sendInteractiveProductList({
  phoneNumberId: '123',
  to: '56961567267',
  catalogId: 'CAT123',
  bodyText: 'Our catalog',
  sections: [
    {
      title: 'Featured items',
      productItems: [
        { productRetailerId: 'SKU-1' },
        { productRetailerId: 'SKU-2' }
      ]
    }
  ]
});

Flows

await client.messages.sendInteractiveFlow({
  phoneNumberId: '123',
  to: '56961567267',
  bodyText: 'Complete the form',
  parameters: {
    flowId: 'FLOW123',
    flowAction: 'navigate',
    flowActionPayload: { screen: 'welcome' }
  }
});
I