Sending messages
Send list
Send a menu of up to ten options.
Sends a message with a button that opens a menu. Useful when you have more than three choices.
GET
/send-listParameters
LicenseNumberstringrequired | Your license number, shown on the Developer API page. |
|---|---|
APIKeystringrequired | Your API key, shown on the Developer API page. |
Contactstringrequired | Recipient number with country code, digits only. |
Messagestringrequired | Message body, up to 1024 characters. |
Buttonstringrequired | The menu items separated by commas. At most 10, each up to 24 characters. |
ListButtonTextstring | Label of the button that opens the menu (default Options, up to 20 characters). |
SectionTextstring | Title of the list section (default Options). |
HeaderTypestring | Use text for a text header. |
HeaderTextstring | Header text, up to 60 characters. |
FooterTextstring | Small footer, up to 60 characters. |
Example request
curl -G "https://console.tendigit.in/api/v1/ext/send-list" \
--data-urlencode "LicenseNumber=YOUR_LICENSE" \
--data-urlencode "APIKey=YOUR_API_KEY" \
--data-urlencode "Contact=919876543210" \
--data-urlencode "Message=Pick a category" \
--data-urlencode "ListButtonText=View categories" \
--data-urlencode "SectionText=Collections" \
--data-urlencode "Button=New arrivals,Best sellers,On sale"Response
json
{
"success": true,
"messageId": "cmt8z1abc0007xyz",
"status": "QUEUED"
}24-hour window
Free-form messages (text, media, buttons, lists) can only be sent while the contact's 24-hour conversation window is open, meaning they messaged you in the last 24 hours. Outside the window, send an approved template instead. If the window is closed you get a SESSION_EXPIRED error.