Sending messages
Send text
Send a plain text message inside the 24-hour window.
Sends a plain text message. The contact must have messaged you in the last 24 hours.
GET
/send-textParameters
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 | The text to send, up to 4096 characters. |
Namestring | Contact name, used if the contact is created. |
Example request
curl -G "https://console.tendigit.in/api/v1/ext/send-text" \
--data-urlencode "LicenseNumber=YOUR_LICENSE" \
--data-urlencode "APIKey=YOUR_API_KEY" \
--data-urlencode "Contact=919876543210" \
--data-urlencode "Message=Hi Rahul, your order has shipped."Response
json
{
"success": true,
"messageId": "cmt8z1abc0004xyz",
"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.