Sending Product Messages

Send interactive catalog messages so customers can browse products and add to cart inside WhatsApp.

Product list

POST /api/external/messages/product-list

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

Request parameters

FieldRequiredTypeDescription
phoneNumberIdYesstringWhatsApp phone number ID to send from
toYesstringRecipient phone with country code
catalogIdYesstringMeta catalog ID
productRetailerIdsOne ofarrayRetailer IDs for a single section. Required if sections is not provided.
sectionsOne ofarrayMulti-section layout. Each section: title, product_items[] with product_retailer_id.
headerTextNostringDefault Our Products
bodyTextNostringDefault Check out our products!
footerTextNostringDefault Tap a product to view details
sectionTitleNostringSection title when using productRetailerIds. Default Products

Response example

{
  "success": true,
  "message": "Product list message sent",
  "data": {
    "messageId": "wamid.HBgMOTE5ODc2NTQzMjEwFQIAERgSQjAwMDAwMDAwMDAwMDAwAA=="
  }
}

Single product

POST /api/external/messages/single-product

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

Request parameters

FieldRequiredTypeDescription
phoneNumberIdYesstringWhatsApp phone number ID to send from
toYesstringRecipient phone with country code
catalogIdYesstringMeta catalog ID
productRetailerIdYesstringProduct retailer ID (SKU)
bodyTextNostringDefault Check out this product!

Response example

{
  "success": true,
  "message": "Single product message sent",
  "data": {
    "messageId": "wamid.HBgMOTE5ODc2NTQzMjEwFQIAERgSQjAwMDAwMDAwMDAwMDAwAA=="
  }
}

Product list payload builder

GET /api/external/catalogs/:catalogId/product-list-payload

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

Builds ready-to-send sections[] for a product list message, optionally filtered by category.

Query parameters

FieldRequiredTypeDescription
categoryNostringFilter to a single category slug
groupByCategoryNostringPass true or 1 to build multi-section payload grouped by category

Response example

{
  "success": true,
  "catalogId": "900000000000003",
  "sections": [
    {
      "title": "Apparel",
      "product_items": [
        { "product_retailer_id": "SKU-DEMO-001" }
      ]
    }
  ],
  "productRetailerIds": ["SKU-DEMO-001"],
  "totalProducts": 1,
  "truncated": false
}

Code samples — product list

curl -X POST https://chatyug.com/api/external/messages/product-list \
  -H "Authorization: Bearer ck_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "phoneNumberId": "100000000000001",
    "to": "919876543210",
    "catalogId": "900000000000003",
    "productRetailerIds": ["SKU-DEMO-001"],
    "headerText": "Our Products",
    "bodyText": "Browse and add to cart in WhatsApp"
  }'
const axios = require('axios');

await axios.post('https://chatyug.com/api/external/messages/product-list', {
  phoneNumberId: '100000000000001',
  to: '919876543210',
  catalogId: '900000000000003',
  productRetailerIds: ['SKU-DEMO-001'],
  headerText: 'Our Products',
  bodyText: 'Browse and add to cart in WhatsApp'
}, { headers: { Authorization: 'Bearer ck_your_api_key_here' } });
import requests

requests.post('https://chatyug.com/api/external/messages/product-list', json={
    'phoneNumberId': '100000000000001',
    'to': '919876543210',
    'catalogId': '900000000000003',
    'productRetailerIds': ['SKU-DEMO-001'],
    'headerText': 'Our Products',
    'bodyText': 'Browse and add to cart in WhatsApp'
}, headers={'Authorization': 'Bearer ck_your_api_key_here'})
$client = new GuzzleHttp\Client();
$client->post('https://chatyug.com/api/external/messages/product-list', [
    'headers' => ['Authorization' => 'Bearer ck_your_api_key_here'],
    'json' => [
        'phoneNumberId' => '100000000000001',
        'to' => '919876543210',
        'catalogId' => '900000000000003',
        'productRetailerIds' => ['SKU-DEMO-001'],
        'headerText' => 'Our Products',
        'bodyText' => 'Browse and add to cart in WhatsApp'
    ]
]);
Related webhook: When the customer completes checkout in WhatsApp's native cart, ChatYug forwards eventType: order to your webhook URL. The order is stored with order_source: catalog_cart. See Event Reference.