Sending messages
Send buttons
Send a message with up to three quick-reply buttons.
Sends a message with tappable reply buttons. When the contact taps one, their choice arrives as a normal incoming message.
GET
/send-buttonParameters
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 | Button labels separated by commas. At most 3, each up to 20 characters: Yes,No,Talk to us. |
HeaderTypestring | text, image, video or document. |
HeaderTextstring | Header text, up to 60 characters (with HeaderType=text). |
HeaderURLstring | Public URL for an image, video or document header. |
FooterTextstring | Small footer, up to 60 characters. |
Example request
curl -G "https://console.tendigit.in/api/v1/ext/send-button" \
--data-urlencode "LicenseNumber=YOUR_LICENSE" \
--data-urlencode "APIKey=YOUR_API_KEY" \
--data-urlencode "Contact=919876543210" \
--data-urlencode "Message=Your order is ready. What next?" \
--data-urlencode "Button=Track order,Talk to support" \
--data-urlencode "FooterText=Reply within 24 hours"Response
json
{
"success": true,
"messageId": "cmt8z1abc0006xyz",
"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.