# POST /messages — Send Multi Product Message

> Product: **Pabbly Chatflow** (v1)
> Base URL: `https://chatflow.pabbly.com/api/v1`
> Auth: Bearer via `Authorization` header
> Canonical: `/chatflow/messages/send-multi-product-message`

Hit the API with POST method and fill the following data according your requirements to send Multi Product message.

**Body parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| to | integer | Yes | Recipient number with dialing code |
| type | string | Yes | Type of message you want to send, It should be "interactive" incase you want to send multi-product message |
| interactiveType | string | No | Must be "product_list" |
| header | string | Yes | Header text (max 60 chars) |
| body | string | Yes | Message body text (max 1024 characters) |
| footer | string | No | Footer text (max 60 chars) |
| action | object | No |  |
|   ↳ catalogId | string | No |  |
| sections | array | Yes | Array of sections (max 10 sections, max 30 products total) |
| action.catalogId | string | Yes | The catalog ID from Meta Commerce |
| sections[].title | string | Yes | Section title (max 24 chars) |
| sections[].products[].productRetailerId | string | Yes | Product retailer ID |

**Example request body:**

```json
{
    "to": 1123456789,
    "type": "interactive",
    "interactiveType": "product_list",
    "header": "Our Top Picks",
    "body": "Browse our curated selection of products",
    "footer": "Tap any product to view details",
    "action": {
        "catalogId": "84745839084XXXX"
    },
    "sections": [
        {
            "title": "Best Sellers",
            "products": [
                { "productRetailerId": "oozba9XXXX" },
                { "productRetailerId": "faz4ioXXXX" }
            ]
        },
        {
            "title": "New Arrivals",
            "products": [
                { "productRetailerId": "g4qoqiXXXX" }
            ]
        }
    ]
}
```

**Response (200)** — Send Multi Product Message:

```json
{
  "success": true,
  "message": "Message sent",
  "data": {
    "to": "911123456789",
    "chatId": "6789abcdef1XXXXX",
    "metaResponse": {
      "messaging_product": "whatsapp",
      "contacts": [
        {
          "input": "911123456789",
          "wa_id": "911123456789"
        }
      ],
      "messages": [
        {
          "id": "wamid.HBgLOTE5ODc2NTQzMjEwFQIAERgSQTEyMzQ1Njc4OTAxMjM0NTY="
        }
      ],
      "status": 200
    }
  }
}
```

**Code examples:**

_cURL_

```curl
curl -X POST https://chatflow.pabbly.com/api/v1/messages \
  -H "Authorization: Bearer {{YOUR_API_KEY}}" \
  -H "Content-Type: application/json" \
  -d '{
    "to": 1123456789,
    "type": "interactive",
    "interactiveType": "product_list",
    "header": "Our Top Picks",
    "body": "Browse our curated selection of products",
    "footer": "Tap any product to view details",
    "action": {
      "catalogId": "84745839084XXXX"
    },
    "sections": [
      {
        "title": "Best Sellers",
        "products": [
          {
            "productRetailerId": "oozba9XXXX"
          },
          {
            "productRetailerId": "faz4ioXXXX"
          }
        ]
      },
      {
        "title": "New Arrivals",
        "products": [
          {
            "productRetailerId": "g4qoqiXXXX"
          }
        ]
      }
    ]
  }'
```

_Ruby_

```ruby
require 'net/http'
require 'json'

uri = URI('https://chatflow.pabbly.com/api/v1/messages')
request = Net::HTTP::Post.new(uri)
request['Authorization'] = 'Bearer {{YOUR_API_KEY}}'
request['Content-Type'] = 'application/json'
request.body = "{\"to\":1123456789,\"type\":\"interactive\",\"interactiveType\":\"product_list\",\"header\":\"Our Top Picks\",\"body\":\"Browse our curated selection of products\",\"footer\":\"Tap any product to view details\",\"action\":{\"catalogId\":\"84745839084XXXX\"},\"sections\":[{\"title\":\"Best Sellers\",\"products\":[{\"productRetailerId\":\"oozba9XXXX\"},{\"productRetailerId\":\"faz4ioXXXX\"}]},{\"title\":\"New Arrivals\",\"products\":[{\"productRetailerId\":\"g4qoqiXXXX\"}]}]}"

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(request)
end

data = JSON.parse(response.body)
```

_Python_

```python
import requests

response = requests.post(
    'https://chatflow.pabbly.com/api/v1/messages',
    headers={'Authorization': 'Bearer {{YOUR_API_KEY}}'},
    json={
    'to': 1123456789,
    'type': 'interactive',
    'interactiveType': 'product_list',
    'header': 'Our Top Picks',
    'body': 'Browse our curated selection of products',
    'footer': 'Tap any product to view details',
    'action': {
        'catalogId': '84745839084XXXX'
    },
    'sections': [
        {
            'title': 'Best Sellers',
            'products': [
                {
                    'productRetailerId': 'oozba9XXXX'
                },
                {
                    'productRetailerId': 'faz4ioXXXX'
                }
            ]
        },
        {
            'title': 'New Arrivals',
            'products': [
                {
                    'productRetailerId': 'g4qoqiXXXX'
                }
            ]
        }
    ]
},
)

data = response.json()
```

_PHP_

```php
<?php
$ch = curl_init('https://chatflow.pabbly.com/api/v1/messages');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer {{YOUR_API_KEY}}', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"to":1123456789,"type":"interactive","interactiveType":"product_list","header":"Our Top Picks","body":"Browse our curated selection of products","footer":"Tap any product to view details","action":{"catalogId":"84745839084XXXX"},"sections":[{"title":"Best Sellers","products":[{"productRetailerId":"oozba9XXXX"},{"productRetailerId":"faz4ioXXXX"}]},{"title":"New Arrivals","products":[{"productRetailerId":"g4qoqiXXXX"}]}]}');

$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
```

_Java_

```java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder()
    .uri(URI.create("https://chatflow.pabbly.com/api/v1/messages"))
    .header("Authorization", "Bearer {{YOUR_API_KEY}}")
    .header("Content-Type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\"to\":1123456789,\"type\":\"interactive\",\"interactiveType\":\"product_list\",\"header\":\"Our Top Picks\",\"body\":\"Browse our curated selection of products\",\"footer\":\"Tap any product to view details\",\"action\":{\"catalogId\":\"84745839084XXXX\"},\"sections\":[{\"title\":\"Best Sellers\",\"products\":[{\"productRetailerId\":\"oozba9XXXX\"},{\"productRetailerId\":\"faz4ioXXXX\"}]},{\"title\":\"New Arrivals\",\"products\":[{\"productRetailerId\":\"g4qoqiXXXX\"}]}]}"));

HttpRequest request = builder.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

_Node.js_

```node
const response = await fetch('https://chatflow.pabbly.com/api/v1/messages', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer {{YOUR_API_KEY}}',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "to": 1123456789,
    "type": "interactive",
    "interactiveType": "product_list",
    "header": "Our Top Picks",
    "body": "Browse our curated selection of products",
    "footer": "Tap any product to view details",
    "action": {
      "catalogId": "84745839084XXXX"
    },
    "sections": [
      {
        "title": "Best Sellers",
        "products": [
          {
            "productRetailerId": "oozba9XXXX"
          },
          {
            "productRetailerId": "faz4ioXXXX"
          }
        ]
      },
      {
        "title": "New Arrivals",
        "products": [
          {
            "productRetailerId": "g4qoqiXXXX"
          }
        ]
      }
    ]
  }),
});

const data = await response.json();
```

_Go_

```go
package main

import (
    "fmt"
    "io"
    "net/http"
    "strings"
)

func main() {
    payload := strings.NewReader("{\"to\":1123456789,\"type\":\"interactive\",\"interactiveType\":\"product_list\",\"header\":\"Our Top Picks\",\"body\":\"Browse our curated selection of products\",\"footer\":\"Tap any product to view details\",\"action\":{\"catalogId\":\"84745839084XXXX\"},\"sections\":[{\"title\":\"Best Sellers\",\"products\":[{\"productRetailerId\":\"oozba9XXXX\"},{\"productRetailerId\":\"faz4ioXXXX\"}]},{\"title\":\"New Arrivals\",\"products\":[{\"productRetailerId\":\"g4qoqiXXXX\"}]}]}")
    req, _ := http.NewRequest("POST", "https://chatflow.pabbly.com/api/v1/messages", payload)
    req.Header.Set("Content-Type", "application/json")
    req.Header.Set("Authorization", "Bearer {{YOUR_API_KEY}}")

    res, _ := http.DefaultClient.Do(req)
    defer res.Body.Close()
    body, _ := io.ReadAll(res.Body)
    fmt.Println(string(body))
}
```

_.NET_

```dotnet
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://chatflow.pabbly.com/api/v1/messages");
request.Headers.TryAddWithoutValidation("Authorization", "Bearer {{YOUR_API_KEY}}");
request.Content = new StringContent("{\"to\":1123456789,\"type\":\"interactive\",\"interactiveType\":\"product_list\",\"header\":\"Our Top Picks\",\"body\":\"Browse our curated selection of products\",\"footer\":\"Tap any product to view details\",\"action\":{\"catalogId\":\"84745839084XXXX\"},\"sections\":[{\"title\":\"Best Sellers\",\"products\":[{\"productRetailerId\":\"oozba9XXXX\"},{\"productRetailerId\":\"faz4ioXXXX\"}]},{\"title\":\"New Arrivals\",\"products\":[{\"productRetailerId\":\"g4qoqiXXXX\"}]}]}");
request.Content.Headers.ContentType = new MediaTypeHeaderValue("application/json");

var response = await client.SendAsync(request);
var data = await response.Content.ReadAsStringAsync();
Console.WriteLine(data);
```

---

**Other endpoints in Messages:**

- [POST /messages — Send Text template](/chatflow/messages/send-text-template)
- [POST /messages — Send Media based template](/chatflow/messages/send-media-based-template)
- [POST /messages — Send Authentication template](/chatflow/messages/send-authentication-template)
- [POST /messages — Send CTA/Buttons template](/chatflow/messages/send-cta-buttons-template)
- [POST /messages — Send Carousel template](/chatflow/messages/send-carousel-template)
- [POST /messages — Send LTO template](/chatflow/messages/send-lto-template)
- [POST /messages — Send Text Message](/chatflow/messages/send-text-message)
- [POST /messages — Send Image Message](/chatflow/messages/send-image-message)
- [POST /messages — Send Audio Message](/chatflow/messages/send-audio-message)
- [POST /messages — Send Video Message](/chatflow/messages/send-video-message)
- [POST /messages — Send Document Message](/chatflow/messages/send-document-message)
- [POST /messages — Send Single Product Message](/chatflow/messages/send-single-product-message)
- [POST /messages — Send Catalog Message](/chatflow/messages/send-catalog-message)
- [POST /messages — Send List Message](/chatflow/messages/send-list-message)
- [POST /messages — Send CTA URL Message](/chatflow/messages/send-cta-url-message)
- [POST /messages — Send Address Request Message](/chatflow/messages/send-address-request-message)
- [POST /messages — Send Location Request Message](/chatflow/messages/send-location-request-message)

