Skip to main content

Device Template

Endpoint: https://BASE_URL/api/send/template Request Type: POST Sample Response:
OptionsRequiredDescription
phone-numberyesstring
The destination phone number. Phone number must be in the international format (Example:CompanyName
device-idyesstring
Represents the Device ID for Whatsapp. It can be Alphanumeric. It should be passed when the message is sent via whatsapp (It can be found on the manage device page on your Termii dashboard)
teplate-idyesstring
The ID of the template used
api-keyyesstring
Your API key (It can be found on your Termii dashboard).
dataobjectobject
Represents an object of key: value pair. The keys for the data object can be found on the device subscription page on your dashboard. (Example: {"product_name": "Termii", "otp" : 120435, })
{
 "phone_number": "2347880234567",
 "device_id": "talert",
 "template_id": "1493-csdn3-ns34w-sd3434-dfdf",
 "api_key": "plain",
 "data": {
     "product_name": "Termii",
     "otp" : 120435,
     "expiry_time": "10 minutes"
} 
Response:
   [
      {
          "code": "ok",
          "message_id": "2255298515609943356",
          "message": "Successfully Sent",
          "balance": "unlimited",
          "user": "Termii Inc."
      }
   ]