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',
    flowCta: 'Open', // required by Meta (1-20 chars)
    flowAction: 'navigate',
    flowActionPayload: { screen: 'welcome' }
  }
});

CTA URL

await client.messages.sendInteractiveCta({
  phoneNumberId: '123',
  to: '56961567267',
  bodyText: 'Check out our latest deals',
  parameters: {
    displayText: 'Visit Website', // max 20 chars
    url: 'https://example.com/deals'
  }
});

Location request

await client.messages.sendLocationRequest({
  phoneNumberId: '123',
  to: '56961567267',
  bodyText: 'Please share your location'
});

Address message

// India only
await client.messages.sendAddressMessage({
  phoneNumberId: '123',
  to: '91XXXXXXXXXX',
  bodyText: 'Please confirm your delivery address',
  parameters: {
    country: 'IN',
    // Optional: pre-fill values
    values: {
      name: 'John Doe',
      phoneNumber: '+919876543210',
      inPinCode: '400063',
      city: 'Mumbai'
    }
  }
});

Call permission request

await client.messages.sendCallPermissionRequest({
  phoneNumberId: '123',
  to: '56961567267',
  bodyText: 'We would like to call you about your order'
});

Catalog message

await client.messages.sendCatalogMessage({
  phoneNumberId: '123',
  to: '56961567267',
  bodyText: 'Browse our full catalog',
  parameters: {
    thumbnailProductRetailerId: 'SKU_FEATURED' // optional
  }
});