> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wapimax.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Send List

> Send an interactive list menu with sections and selectable rows.

## Endpoint

POST `https://api.wapimax.com/whatsapp/v1/sessions/{session_id}/messages/list`

## Authentication

Every request must include your API key in the `X-API-Key` header. See [Authorization](https://docs.wapimax.com/get-started/authorization.md) to create one.

| Header | Value | Required |
| - | - | - |
| `X-API-Key` | Your WapiMax API key | Yes |
| `Content-Type` | `application/json` | Yes |

## Path parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `session_id` | string | Yes | Session used to send the message |

## Body parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `to` | string | Yes | Recipient ID, for example `254712345678@s.whatsapp.net` |
| `title` | string | Yes | List title |
| `description` | string | Yes | List body text |
| `button_text` | string | Yes | Text on the menu button |
| `footer` | string | No | Footer text |
| `sections` | array | Yes | List sections |
| `reply_to` | string | No | ID of the message to reply to |
| `send_at` | string | No | Scheduled send time, ISO 8601 UTC |

### Section object

| Parameter | Type | Description |
| - | - | - |
| `title` | string | Section title |
| `rows` | array | Selectable rows |

### Row object

| Parameter | Type | Description |
| - | - | - |
| `row_id` | string | Row ID returned on selection |
| `title` | string | Row title |
| `description` | string | Row description |

## Request

```bash cURL theme={null}
curl -X POST "https://api.wapimax.com/whatsapp/v1/sessions/YOUR_SESSION_ID/messages/list" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "to": "254712345678@s.whatsapp.net",
    "title": "Explore WapiMax",
    "description": "Choose a service to continue.",
    "button_text": "View Services",
    "footer": "Powered by WapiMax",
    "sections": [
      {
        "title": "Messaging",
        "rows": [
          {
            "row_id": "send_message",
            "title": "Send Message",
            "description": "Send WhatsApp messages."
          },
          {
            "row_id": "send_media",
            "title": "Send Media",
            "description": "Share images, videos and documents."
          }
        ]
      },
      {
        "title": "Automation",
        "rows": [
          {
            "row_id": "chatbots",
            "title": "Chatbots",
            "description": "Automate customer conversations."
          }
        ]
      }
    ]
  }'
```

```javascript JavaScript theme={null}
const body = {
  to: "254712345678@s.whatsapp.net",
  title: "Explore WapiMax",
  description: "Choose a service to continue.",
  button_text: "View Services",
  footer: "Powered by WapiMax",
  sections: [
    {
      title: "Messaging",
      rows: [
        { row_id: "send_message", title: "Send Message", description: "Send WhatsApp messages." },
        { row_id: "send_media", title: "Send Media", description: "Share images, videos and documents." }
      ]
    },
    {
      title: "Automation",
      rows: [
        { row_id: "chatbots", title: "Chatbots", description: "Automate customer conversations." }
      ]
    }
  ]
};

const response = await fetch("https://api.wapimax.com/whatsapp/v1/sessions/YOUR_SESSION_ID/messages/list", {
  method: "POST",
  headers: {
    "X-API-Key": "YOUR_API_KEY",
    "Content-Type": "application/json",
    "Accept": "application/json"
  },
  body: JSON.stringify(body)
});

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

```javascript Node.js theme={null}
// Node.js 18 or later
const body = {
  to: "254712345678@s.whatsapp.net",
  title: "Explore WapiMax",
  description: "Choose a service to continue.",
  button_text: "View Services",
  footer: "Powered by WapiMax",
  sections: [
    {
      title: "Messaging",
      rows: [
        { row_id: "send_message", title: "Send Message", description: "Send WhatsApp messages." },
        { row_id: "send_media", title: "Send Media", description: "Share images, videos and documents." }
      ]
    },
    {
      title: "Automation",
      rows: [
        { row_id: "chatbots", title: "Chatbots", description: "Automate customer conversations." }
      ]
    }
  ]
};

const response = await fetch("https://api.wapimax.com/whatsapp/v1/sessions/YOUR_SESSION_ID/messages/list", {
  method: "POST",
  headers: {
    "X-API-Key": process.env.WAPIMAX_API_KEY,
    "Content-Type": "application/json",
    "Accept": "application/json"
  },
  body: JSON.stringify(body)
});

if (!response.ok) {
  throw new Error(`Request failed with status ${response.status}`);
}

console.log(await response.json());
```

```php PHP theme={null}
<?php

$body = [
  "to" => "254712345678@s.whatsapp.net",
  "title" => "Explore WapiMax",
  "description" => "Choose a service to continue.",
  "button_text" => "View Services",
  "footer" => "Powered by WapiMax",
  "sections" => [
    [
      "title" => "Messaging",
      "rows" => [
        ["row_id" => "send_message", "title" => "Send Message", "description" => "Send WhatsApp messages."],
        ["row_id" => "send_media", "title" => "Send Media", "description" => "Share images, videos and documents."]
      ]
    ],
    [
      "title" => "Automation",
      "rows" => [
        ["row_id" => "chatbots", "title" => "Chatbots", "description" => "Automate customer conversations."]
      ]
    ]
  ]
];

$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => "https://api.wapimax.com/whatsapp/v1/sessions/YOUR_SESSION_ID/messages/list",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => json_encode($body),
    CURLOPT_HTTPHEADER => [
        "X-API-Key: YOUR_API_KEY",
        "Content-Type: application/json",
        "Accept: application/json"
    ]
]);

$response = curl_exec($curl);
curl_close($curl);

echo $response;
```

```python Python theme={null}
import requests

body = {
    "to": "254712345678@s.whatsapp.net",
    "title": "Explore WapiMax",
    "description": "Choose a service to continue.",
    "button_text": "View Services",
    "footer": "Powered by WapiMax",
    "sections": [
        {
            "title": "Messaging",
            "rows": [
                {"row_id": "send_message", "title": "Send Message", "description": "Send WhatsApp messages."},
                {"row_id": "send_media", "title": "Send Media", "description": "Share images, videos and documents."}
            ]
        },
        {
            "title": "Automation",
            "rows": [
                {"row_id": "chatbots", "title": "Chatbots", "description": "Automate customer conversations."}
            ]
        }
    ]
}

response = requests.post(
    "https://api.wapimax.com/whatsapp/v1/sessions/YOUR_SESSION_ID/messages/list",
    headers={
        "X-API-Key": "YOUR_API_KEY",
        "Content-Type": "application/json",
        "Accept": "application/json"
    },
    json=body
)

print(response.json())
```

```java Java theme={null}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Main {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();

        String body = """
            {
              "to": "254712345678@s.whatsapp.net",
              "title": "Explore WapiMax",
              "description": "Choose a service to continue.",
              "button_text": "View Services",
              "footer": "Powered by WapiMax",
              "sections": [
                {
                  "title": "Messaging",
                  "rows": [
                    {"row_id": "send_message", "title": "Send Message", "description": "Send WhatsApp messages."},
                    {"row_id": "send_media", "title": "Send Media", "description": "Share images, videos and documents."}
                  ]
                },
                {
                  "title": "Automation",
                  "rows": [
                    {"row_id": "chatbots", "title": "Chatbots", "description": "Automate customer conversations."}
                  ]
                }
              ]
            }
            """;

        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://api.wapimax.com/whatsapp/v1/sessions/YOUR_SESSION_ID/messages/list"))
            .header("X-API-Key", "YOUR_API_KEY")
            .header("Content-Type", "application/json")
            .header("Accept", "application/json")
            .POST(HttpRequest.BodyPublishers.ofString(body))
            .build();

        HttpResponse<String> response = client.send(
            request,
            HttpResponse.BodyHandlers.ofString()
        );

        System.out.println(response.body());
    }
}
```

```go Go theme={null}
package main

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

func main() {
    body := bytes.NewBuffer([]byte(`{
  "to": "254712345678@s.whatsapp.net",
  "title": "Explore WapiMax",
  "description": "Choose a service to continue.",
  "button_text": "View Services",
  "footer": "Powered by WapiMax",
  "sections": [
    {
      "title": "Messaging",
      "rows": [
        {"row_id": "send_message", "title": "Send Message", "description": "Send WhatsApp messages."},
        {"row_id": "send_media", "title": "Send Media", "description": "Share images, videos and documents."}
      ]
    },
    {
      "title": "Automation",
      "rows": [
        {"row_id": "chatbots", "title": "Chatbots", "description": "Automate customer conversations."}
      ]
    }
  ]
}`))

    req, _ := http.NewRequest(
        "POST",
        "https://api.wapimax.com/whatsapp/v1/sessions/YOUR_SESSION_ID/messages/list",
        body,
    )

    req.Header.Set("X-API-Key", "YOUR_API_KEY")
    req.Header.Set("Content-Type", "application/json")
    req.Header.Set("Accept", "application/json")

    resp, err := http.DefaultClient.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    responseBody, _ := io.ReadAll(resp.Body)
    fmt.Println(string(responseBody))
}
```

```ruby Ruby theme={null}
require "net/http"
require "uri"
require "json"

uri = URI("https://api.wapimax.com/whatsapp/v1/sessions/YOUR_SESSION_ID/messages/list")

body = {
  to: "254712345678@s.whatsapp.net",
  title: "Explore WapiMax",
  description: "Choose a service to continue.",
  button_text: "View Services",
  footer: "Powered by WapiMax",
  sections: [
    {
      title: "Messaging",
      rows: [
        { row_id: "send_message", title: "Send Message", description: "Send WhatsApp messages." },
        { row_id: "send_media", title: "Send Media", description: "Share images, videos and documents." }
      ]
    },
    {
      title: "Automation",
      rows: [
        { row_id: "chatbots", title: "Chatbots", description: "Automate customer conversations." }
      ]
    }
  ]
}

request = Net::HTTP::Post.new(uri)
request["X-API-Key"] = "YOUR_API_KEY"
request["Content-Type"] = "application/json"
request["Accept"] = "application/json"
request.body = body.to_json

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

puts response.body
```

```csharp C# theme={null}
using System;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        using var client = new HttpClient();

        var body = new
        {
            to = "254712345678@s.whatsapp.net",
            title = "Explore WapiMax",
            description = "Choose a service to continue.",
            button_text = "View Services",
            footer = "Powered by WapiMax",
            sections = new[]
            {
                new
                {
                    title = "Messaging",
                    rows = new[]
                    {
                        new { row_id = "send_message", title = "Send Message", description = "Send WhatsApp messages." },
                        new { row_id = "send_media", title = "Send Media", description = "Share images, videos and documents." }
                    }
                },
                new
                {
                    title = "Automation",
                    rows = new[]
                    {
                        new { row_id = "chatbots", title = "Chatbots", description = "Automate customer conversations." }
                    }
                }
            }
        };

        var json = JsonSerializer.Serialize(body);
        var content = new StringContent(json, Encoding.UTF8, "application/json");

        client.DefaultRequestHeaders.Add("X-API-Key", "YOUR_API_KEY");
        client.DefaultRequestHeaders.Add("Accept", "application/json");

        var response = await client.PostAsync(
            "https://api.wapimax.com/whatsapp/v1/sessions/YOUR_SESSION_ID/messages/list",
            content
        );

        Console.WriteLine(await response.Content.ReadAsStringAsync());
    }
}
```

```swift Swift theme={null}
import Foundation

let url = URL(string: "https://api.wapimax.com/whatsapp/v1/sessions/YOUR_SESSION_ID/messages/list")!

let body: [String: Any] = [
    "to": "254712345678@s.whatsapp.net",
    "title": "Explore WapiMax",
    "description": "Choose a service to continue.",
    "button_text": "View Services",
    "footer": "Powered by WapiMax",
    "sections": [
        [
            "title": "Messaging",
            "rows": [
                ["row_id": "send_message", "title": "Send Message", "description": "Send WhatsApp messages."],
                ["row_id": "send_media", "title": "Send Media", "description": "Share images, videos and documents."]
            ]
        ],
        [
            "title": "Automation",
            "rows": [
                ["row_id": "chatbots", "title": "Chatbots", "description": "Automate customer conversations."]
            ]
        ]
    ]
]

var request = URLRequest(url: url)
request.httpMethod = "POST"
request.setValue("YOUR_API_KEY", forHTTPHeaderField: "X-API-Key")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.setValue("application/json", forHTTPHeaderField: "Accept")
request.httpBody = try? JSONSerialization.data(withJSONObject: body)

URLSession.shared.dataTask(with: request) { data, _, error in
    if let error = error {
        print(error)
        return
    }

    if let data = data {
        print(String(data: data, encoding: .utf8) ?? "")
    }
}.resume()
```

```kotlin Kotlin theme={null}
import okhttp3.MediaType.Companion.toMediaType
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.RequestBody.Companion.toRequestBody

fun main() {
    val client = OkHttpClient()

    val body = """
    {
      "to": "254712345678@s.whatsapp.net",
      "title": "Explore WapiMax",
      "description": "Choose a service to continue.",
      "button_text": "View Services",
      "footer": "Powered by WapiMax",
      "sections": [
        {
          "title": "Messaging",
          "rows": [
            {"row_id": "send_message", "title": "Send Message", "description": "Send WhatsApp messages."},
            {"row_id": "send_media", "title": "Send Media", "description": "Share images, videos and documents."}
          ]
        },
        {
          "title": "Automation",
          "rows": [
            {"row_id": "chatbots", "title": "Chatbots", "description": "Automate customer conversations."}
          ]
        }
      ]
    }
    """.trimIndent()

    val request = Request.Builder()
        .url("https://api.wapimax.com/whatsapp/v1/sessions/YOUR_SESSION_ID/messages/list")
        .post(body.toRequestBody("application/json".toMediaType()))
        .addHeader("X-API-Key", "YOUR_API_KEY")
        .addHeader("Content-Type", "application/json")
        .addHeader("Accept", "application/json")
        .build()

    client.newCall(request).execute().use { response ->
        println(response.body?.string())
    }
}
```

## Response

```json Sent theme={null}
{
  "status": "sent",
  "message_id": "3EB0C8F1A2B3C4D5E6",
  "timestamp": 1794304083,
  "to": "254712345678@s.whatsapp.net"
}
```

```json Scheduled theme={null}
{
  "status": "pending",
  "schedule_id": "b3f1c2a4-1234-4cde-9f00-abcdef123456",
  "send_at": "2026-12-01T12:00:00Z"
}
```

### Response fields

| Field | Type | Description |
| - | - | - |
| `status` | string | `sent` or `pending` |
| `message_id` | string | Sent message ID |
| `timestamp` | integer | Sent time (Unix) |
| `to` | string | Recipient ID |
| `schedule_id` | string | Scheduled message ID |
| `send_at` | string | Scheduled send time |

## Errors

| Status | Description |
| - | - |
| `400` | Invalid request or parameters |
| `401` | Missing or invalid API key |
| `403` | Access to this session is not allowed |
| `404` | Session or resource not found |
| `429` | Rate limit or quota exceeded |
| `503` | Session is not connected |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.