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.sendInteractiveCtaUrl({
  phoneNumberId: '123',
  to: '56961567267',
  bodyText: 'Check out our latest deals',
  parameters: {
    displayText: 'Visit Website', // max 20 chars
    url: 'https://example.com/deals'
  }
});
Free-form interactive carousels are media cards sent inside the 24-hour customer service window. They are different from approved carousel templates, which use sendTemplate and a template carousel component.
await client.messages.sendInteractiveCarousel({
  phoneNumberId: '123',
  to: '56961567267',
  bodyText: 'Choose an option',
  cards: [
    {
      cardIndex: 0,
      header: { type: 'image', image: { link: 'https://example.com/one.jpg' } },
      bodyText: 'First card',
      action: {
        type: 'cta_url',
        displayText: 'View',
        url: 'https://example.com/one'
      }
    },
    {
      cardIndex: 1,
      header: { type: 'video', video: { link: 'https://example.com/two.mp4' } },
      bodyText: 'Second card',
      action: {
        displayText: 'View',
        url: 'https://example.com/two'
      }
    }
  ]
});
For quick replies, every card must use the same number of quick-reply buttons:
await client.messages.sendInteractiveCarousel({
  phoneNumberId: '123',
  to: '56961567267',
  bodyText: 'Pick a product',
  cards: [
    {
      cardIndex: 0,
      header: { type: 'image', image: { link: 'https://example.com/a.jpg' } },
      action: {
        buttons: [
          { id: 'product_a', title: 'Select' }
        ]
      }
    },
    {
      cardIndex: 1,
      header: { type: 'image', image: { link: 'https://example.com/b.jpg' } },
      action: {
        buttons: [
          { id: 'product_b', title: 'Select' }
        ]
      }
    }
  ]
});

Location request

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

Address message

// India only
await client.messages.sendInteractiveAddress({
  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.sendInteractiveCallPermission({
  phoneNumberId: '123',
  to: '56961567267',
  bodyText: 'We would like to call you about your order',
  parameters: {
    phoneNumber: '+15551234567'
  }
});

Catalog message

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