Skip to content
Ten Digit

Sending messages

Send template

Send an approved template with variables, header media and a link button.

Templates are the only message type that can start a conversation or be sent after the 24-hour window. The template must be approved in your account.

GET/send-template

Parameters

LicenseNumberstringrequiredYour license number, shown on the Developer API page.
APIKeystringrequiredYour API key, shown on the Developer API page.
ContactstringrequiredRecipient number with country code, digits only.
TemplatestringrequiredExact name of the approved template.
ParamstringBody variables in order, separated by commas: Rahul,ORD-1001,Tomorrow.
FileurlstringPublic URL of the header image, video or document.
HeadURLstringSame as Fileurl; either name works.
HeadParamstringValue for a text header variable.
URLParamstringThe changing part of a dynamic URL button.
PDFNamestringFile name shown for a document header.
NamestringContact name, used if the contact is created.

Example request

curl -G "https://console.tendigit.in/api/v1/ext/send-template" \
  --data-urlencode "LicenseNumber=YOUR_LICENSE" \
  --data-urlencode "APIKey=YOUR_API_KEY" \
  --data-urlencode "Contact=919876543210" \
  --data-urlencode "Template=order_update" \
  --data-urlencode "Param=Rahul,ORD-1001,Tomorrow"

Response

json
{
  "success": true,
  "messageId": "cmt8z1abc0003xyz",
  "status": "QUEUED",
  "template": "order_update"
}

Cost

Template messages are charged to your wallet at your plan's rate, so keep your balance topped up.

  • TEMPLATE_NOT_FOUND (404): the name does not match an approved template
  • VALIDATION (400): Contact or Template is missing