wa.smsidea.com
  • Back to Login
  • About Us
  • Contacts
  • Price List
  • Privacy Policy
POST : Send Business Initiated Template Message
  • Post Parameters
  • Sample API Code
  • Sample Response
  • API Error codes
  • How it works

Request:

http://wa.smsidea.com/api/v1/sendTemplateMessage


Parameters:

Field Description For Example Required
key Your Instance API Key AbCdEfGhIjKlMnOpQrStUvWxYz123456
to Recipient Number 919812345678
languageCode Language Code en_US
TemplateName Template Name sample_Template
headertype Add a title or choose which type of media you'll use for this header. text / image / video / documents
[ Note :- 1. Image extension .jpeg, .PNG and size 5mb allowed
2. Video extension .mp4, .3gpp and size 16mb allowed
3. Documents extension .pdf and size 100mb allowed ]
BodyParameter An array containing the type and text of the body parameter. [{"type":"text","text":"One"},{"type":"text","text":"Two"},{"type":"text","text":"Three"}]
link All type of media link with extension & passing Base64 formatting https://whatsapp.xyz.com/img/white.png
filename File Name sample file
headertext Header Text Thank you
ButtonParameter An array containing the type and text of the button parameter. [{"type": "url","text": "Your dynamic url"}]
IsFailOverMessage Isto be passed in case SMS needs to be sent for WhatsApp delivery failure true/false
SenderId to be passed for SMS to be sent instead of WhatsApp STTTST
ContentTemplate this is the SMS content that will be sent Hello, This is text message.
SendingMessageType Pass "5" for WABA and "6" for SMS and WABA both 5
scheduledDate Schedule Time ex:(29-Dec-2010 11:45:52 AM) (Compulsary only for schedule messages)
  • C#
  • PHP
  • JAVA

Calling HTTP API Using C#.Net

using System;
using RestSharp;

  public void sendTemplateMessage()
   {
       var client = new RestClient("http://wa.smsidea.com/api/v1/sendTemplateMessage");
       client.Timeout = -1;
       var request = new RestRequest(Method.POST);
       request.AddHeader("Content-Type", "application/json");
       var body =  @"{                      
                        'key' : 'AbCdEfGhIjKlMnOpQrStUvWxYz123456',
                        'to' : '919812345678',    
                        'languageCode' : 'en_US',
                        'TemplateName' : 'sample_Template',
                        'headertype' : 'image',
                        'link' : 'https://www.xyz.com//Files/b4063f333fdec6.jpeg',
                        'filename'  : '',
                        'headertext' : '',                                                       
                        'BodyParameter'  : [                      
                              {
                                  'type' : 'text',
                                  'text' : '1'                                  
                              },
                             {
                                  'type' : 'text',
                                  'text' : '2'                                  
                              },
                             {
                                  'type' : 'text',
                                  'text' : '3'                                  
                              },   
                              {
                                  'type' : 'text',
                                  'text' : '4'                                  
                              }
                          ]                                         
                    }";
       request.AddParameter("application/json", body, ParameterType.RequestBody);
       IRestResponse response = client.Execute(request);
       Console.WriteLine(response .Content);
   }

Calling HTTP API Using VB.Net

Imports System.Net
Imports System.Text

Module Program 
   Sub Main (args As String())        
    Dim jsonstring As String = 
     "{
         'key'  :  'AbCdEfGhIjKlMnOpQrStUvWxYz123456',
         'to' : '919812345678',       
         'url' : 'https://www.xyz.com//Files/b40633fdec6.pdf',
         'filename'  : 'WeAreWorking.jpg',
         'title' : 'title for msg',
         'caption' : 'caption for msg',                                
         'buttons'  : [                      
               {
                   'type' : 'call',
                   'title' : 'call me', 
                   'value' : '919812345678'
               },
               {
                   'type' : 'url',
                   'title' : 'Visite on',
                   'value' : 'https://www.google.com'
               },
               {
                   'type' : 'unsubscribed',
                   'title' : 'unsubscribed'
               },                    
           ],
         'isUrgent' : 'false',
       }"
    Dim RestURL As String = "http://wa.smsidea.com/api/v1/sendButtonMessage"
    Dim client As New Http.HttpClient
    Dim RestContent As New Http.StringContent(jsonstring,Encoding.UTF8,"application/json")
    Dim RestResponse As Http.HttpResponseMessage = client.PostAsync(RestURL, RestContent).GetAwaiter().GetResult()
   End Sub
End Module

Calling HTTP API Using php

<?php                                                            
$curl = curl_init();
curl_setopt_array($curl, array(
     CURLOPT_URL => 'http://wa.smsidea.com/api/v1/sendTemplateMessage',
     CURLOPT_RETURNTRANSFER => true,
     CURLOPT_ENCODING => '',     
     CURLOPT_MAXREDIRS => 10,
     CURLOPT_TIMEOUT => 0, 
     CURLOPT_FOLLOWLOCATION => true,      
     CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
     CURLOPT_CUSTOMREQUEST => 'POST',
     CURLOPT_POSTFIELDS =>
        '{
            "key"  :  "AbCdEfGhIjKlMnOpQrStUvWxYz123456",
            "to" : "919812345678",    
            "languageCode" : "en_US",
            "TemplateName" : "sample_Template",
            "headertype" : "image",
            "link" : "https://www.xyz.com//Files/b4063f333fdec6.jpeg",
            "filename"  : "",
            "headertext" : "",                                                       
            "BodyParameter"  : [                      
                  {
                      "type" : "text",
                      "text" : "1"                                  
                  },
                 {
                      "type" : "text",
                      "text" : "2"                                  
                  },
                 {
                      "type" : "text",
                      "text" : "3"                                  
                  },   
                  {
                      "type" : "text",
                      "text" : "4"                                  
                  }
              ] 
         }',
    CURLOPT_HTTPHEADER => array('Content-Type: application/json'),
));

$response = curl_exec($curl);
curl_close($curl);
echo $response;

?>

Calling HTTP API Using Java

import java.io.IOException;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;

public void sendTemplateMessage() {
    try {
        OkHttpClient client = new OkHttpClient().newBuilder().build();
        MediaType mediaType = MediaType.parse("application/json");
        RequestBody body = RequestBody.create(mediaType,
        "{
            'key'  :  'AbCdEfGhIjKlMnOpQrStUvWxYz123456',
            'to' : '919812345678',    
            'languageCode' : 'en_US',
            'TemplateName' : 'sample_Template',
            'headertype' : 'image',
            'link' : 'https://www.xyz.com//Files/b4063f333fdec6.jpeg',
            'filename'  : '',
            'headertext' : '',                                                       
            'BodyParameter'  : [                      
                  {
                      'type' : 'text',
                      'text' : '1'                                  
                  },
                 {
                      'type' : 'text',
                      'text' : '2'                                  
                  },
                 {
                      'type' : 'text',
                      'text' : '3'                                  
                  },   
                  {
                      'type' : 'text',
                      'text' : '4'                                  
                  }
              ] 
         }");
        Request request = new Request.Builder()
          .url(("http://wa.smsidea.com/api/v1/sendTemplateMessage"))  
          .method("POST", body)
          .addHeader("Content-Type", "application/json")
          .build();
        Response response = client.newCall(request).execute();
    } 
    catch (Exception ex) {
      ex.printStackTrace();
    }
  }


Calling HTTP API Using VB 6

public Sub Form_Load(strUrl As String)

    Dim strUrl as string = "http://wa.smsidea.com/api/v1/sendTemplateMessage"
    Dim jsonText as string 
    jsonText = "{
            'key'  :  'AbCdEfGhIjKlMnOpQrStUvWxYz123456',
            'to' : '919812345678',    
            'languageCode' : 'en_US',
            'TemplateName' : 'sample_Template',
            'headertype' : 'image',
            'link' : 'https://www.xyz.com//Files/b4063f333fdec6.jpeg',
            'filename'  : '',
            'headertext' : '',                                                       
            'BodyParameter'  : [                      
                  {
                      'type' : 'text',
                      'text' : '1'                                  
                  },
                 {
                      'type' : 'text',
                      'text' : '2'                                  
                  },
                 {
                      'type' : 'text',
                      'text' : '3'                                  
                  },   
                  {
                      'type' : 'text',
                      'text' : '4'                                  
                  }
              ] 
                }"
    Dim objHttp as Object
    Dim strText as string
    Set objHttp = CreateObject("MSXML2.ServerXMLHTTP")
    objHttp.Open "POST", strUrl, jsonText, False
    objHttp.setRequestHeader "Content-Type","application/json"
    "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
    objHttp.Send
    strText = objHttp.responseText
    Set objHttp = Nothing

End Sub
Sample Response:

{
"ErrorCode": "000",
"ErrorMessage": "success",
"Data": [
    {
      "key": "AbCdEfGhIjKlMnOpQrStUvWxYz123456",
      "InstanceNumber": "919228489887",
      "mobileNumber": "919825454544"
      "MaskId": "d7475b7c48044366b4dsjgjd48265"     
    }
  ]
}
                                                
API Error codes : (If Error code is not present in given list then please Click here)

  • "ErrorCode": "0","ErrorMessage": "AuthException"
  • "ErrorCode": "1","ErrorMessage": "API Unknown"
  • "ErrorCode": "2","ErrorMessage": "API Service"
  • "ErrorCode": "3","ErrorMessage": "API Method"
  • "ErrorCode": "4","ErrorMessage": "API Too Many Calls"
  • "ErrorCode": "10","ErrorMessage": "API Permission Denied"
  • "ErrorCode": "100","ErrorMessage": "Parameter is invalid"
  • "ErrorCode": "190","ErrorMessage": "Access token has expired"
  • "ErrorCode": "200-299","ErrorMessage": "API Permission (Multiple values depending on permission)"
  • "ErrorCode": "200 (subcode=2494049) ","ErrorMessage": "Phone number is not allowed"
  • "ErrorCode": "368","ErrorMessage": "Temporarily blocked for policies violations"
  • "ErrorCode": "506","ErrorMessage": "Duplicate Post"
  • "ErrorCode": "80007","ErrorMessage": "Rate limit issues"
  • "ErrorCode": "131052","ErrorMessage": "Media download error"
  • "ErrorCode": "131042","ErrorMessage": "Business eligibility — Payment issue"
  • "ErrorCode": "131043","ErrorMessage": "Message expired"
  • "ErrorCode": "130429","ErrorMessage": "Rate limit hit"
  • "ErrorCode": "131045","ErrorMessage": "Unsigned certificate"
  • "ErrorCode": "131016","ErrorMessage": "Service Overloaded"
  • "ErrorCode": "131047","ErrorMessage": "Re-engagement message"
  • "ErrorCode": "131048","ErrorMessage": "Spam Rate limit hit"
  • "ErrorCode": "131000","ErrorMessage": "Generic Error"
  • "ErrorCode": "131001","ErrorMessage": "Message too long"
  • "ErrorCode": "131002","ErrorMessage": "Invalid recipient type"
  • "ErrorCode": "131005","ErrorMessage": "Access denied"
  • "ErrorCode": "131006","ErrorMessage": "Resource not found"
  • "ErrorCode": "131008","ErrorMessage": "Required parameter is missing"
  • "ErrorCode": "131009","ErrorMessage": "Parameter value is not valid"
  • "ErrorCode": "131021","ErrorMessage": "Bad User"
  • "ErrorCode": "131031","ErrorMessage": "Account has been locked"
  • "ErrorCode": "131051","ErrorMessage": "Unsupported message type"
  • "ErrorCode": "131055","ErrorMessage": "Method not allowed"
  • "ErrorCode": "132000","ErrorMessage": "Template Param Count Mismatch"
  • "ErrorCode": "132001","ErrorMessage": "Template does not exist"
  • "ErrorCode": "132005","ErrorMessage": "Template Hydrated Text Too Long"
  • "ErrorCode": "132007","ErrorMessage": "Template Format Character Policy Violated"
  • "ErrorCode": "132012","ErrorMessage": "Template Parameter Format Mismatch"
  • "ErrorCode": "133000","ErrorMessage": "Incomplete Delete"
  • "ErrorCode": "133001","ErrorMessage": "Decryption Error"
  • "ErrorCode": "133002","ErrorMessage": "Backup Blob Decryption Error"
  • "ErrorCode": "133003","ErrorMessage": "Recovery Token Decryption Error"
  • "ErrorCode": "133004","ErrorMessage": "Server Temporarily Unavailable"
  • "ErrorCode": "133005","ErrorMessage": "Security PIN Mismatch"
  • "ErrorCode": "133006","ErrorMessage": "Recovery Token Incorrect"
  • "ErrorCode": "133007","ErrorMessage": "Account Blocked"
  • "ErrorCode": "133008","ErrorMessage": "Too Many PIN Guesses"
  • "ErrorCode": "133009","ErrorMessage": "PIN Guessed Too Fast"

  • "ErrorCode": "501","ErrorMessage": "your url is not valid"
  • "ErrorCode": "502","ErrorMessage": "your file is Over Sized"
  • "ErrorCode": "503","ErrorMessage": "file not found"
  • "ErrorCode": "504","ErrorMessage": "your passing parameters are missing or invalid."
  • "ErrorCode": "505","ErrorMessage": "your passing file is invalid."
Sample Message templates:

Currently, you can send the following template types:

1.Text-Based Message Templates

{ "key": "99e788fdhgrtfgigfg8c286", "to": "919815450960", "languageCode":"en_US", "TemplateName":"sample_text", "headertype":"text", "headertext":"text", "BodyParameter":[ { "type": "text", "text": "1" }, { "type": "text", "text": "2" }, { "type": "text", "text": "3" }, { "type": "text", "text": "4" } ] }


2.Media-Based Message Templates

Media based message templates exm:- Images,Audio,video,Documents,

{ "key": "99e7847gf8fd75fhgf88c286", "to": "919815450960", "languageCode":"en_US", "TemplateName":"sample_text", "headertype":"Image", "link":"http://commondatastorage.googleapis.com/codeskulptor-assets/lathrop/asteroid_brown.png", "filename":"", "headertext":"", "BodyParameter":[ { "type": "text", "text": "1" }, { "type": "text", "text": "2" }, { "type": "text", "text": "3" }, { "type": "text", "text": "4" } ] }


3.Interactive Message Templates

Interactive Message Templates exm:- Buttonmessage,Quick Reply

{ "key": "99e7847gf8fd75fhgf88c286", "to": "919815450960", "languageCode":"en_US", "TemplateName":"sample_text", "headertype":"button", "link":"http://commondatastorage.googleapis.com/codeskulptor-assets/lathrop/asteroid_brown.png", "filename":"", "headertext":"", "BodyParameter":[ { "type": "text", "text": "1" }, { "type": "text", "text": "2" }, { "type": "text", "text": "3" }, { "type": "text", "text": "4" } ] }

POST : Add Templates
  • Post Parameters
  • Sample API Code
  • Sample Response
  • API Error codes

Request:

http://wa.smsidea.com/api/v1/AddWABATemplates


Parameters:

Field Description For Example Required
key Your Instance API Key AbCdEfGhIjKlMnOpQrStUvWxYz123456
language language en_us
name xyz xyz
category account_update account_update
Components ex- HEADER, body ,Footer, https://whatsapp.xyz.com/img/white.png
Header components type header sub paramaters type, format, exmaple, header_handle
Body components type body sub paramaters type, text, exmaple, body_text
Footer components type footer sub paramaters type, text
Buttons components type button sub paramaters type, button
  • C#
  • PHP
  • JAVA

Calling HTTP API Using C#.Net

using System;
using RestSharp;

  public void AddWABATemplates()
   {
       var client = new RestClient("http://wa.smsidea.com/api/v1/AddWABATemplates");
       client.Timeout = -1;
       var request = new RestRequest(Method.POST);
       request.AddHeader("Content-Type", "application/json");
       var body =  @"{
               'key':'99e7883d76284a53b6b4e8d7e8c8c286',
               'language': 'en_US',
               'name':'xds',
               'category':'account_update',
               'components':[
                 {
                   'type': 'HEADER',
                   'format': 'IMAGE',
                   'example': {
                   'header_handle': [
                    'https://xyz.com/Image/file_example_PNG_3MB.png'
                     ]
                   }
                 },
                 {
                   'type': 'BODY',
                   'text': 'Your account balance transfer to a/c  {{1}} from a/c{{2}} in branch name {{3}}.',
                   'example': {
                   'body_text': [
                          [
                            '123456789',
                            '987654321',
                            'Ahmedabad'
                          ]
                        ]
                     }
                 },
                 {
                   'type': 'FOOTER',
                   'text': 'Esta mensagem é de uma empresa não verificada.'
                 },
                 {
                    'type':'BUTTONS',
                    'buttons':
                    [{
                          'type': 'QUICK_REPLY',
                          'text': 'No'
                      },
                      {
                          'type': 'QUICK_REPLY',
                          'text': 'Yes'
                    }]
                 }]
            }";
       request.AddParameter("application/json", body, ParameterType.RequestBody);
       IRestResponse response = client.Execute(request);
       Console.WriteLine(response .Content);
   }

Calling HTTP API Using VB.Net

Imports System.Net
Imports System.Text

Module Program 
   Sub Main (args As String())        
    Dim jsonstring As String = 
     "{
               'key':'da568fa8f9a04c55a7c0338be5fee29f',             
               'to':'919825910960',
               'type':'text',
               'text':{
                       'preview_url':'false',
                       'body':'hello everyone'
               },
               'image':{
                       'link':'www.xyz.com',
               },
               'audio':{
                       'link':'www.xyz.com',
               },
               'video':{
                       'link':'www.xyz.com',
                       'caption':'your caption'
               },
               'document':{
                       'link':'www.xyz.com',
                       'filename':'your filename',
                       'caption':'your caption'
               }
      }"
    Dim RestURL As String = "http://wa.smsidea.com/api/v1/SendUserInitiatedmsg"
    Dim client As New Http.HttpClient
    Dim RestContent As New Http.StringContent(jsonstring,Encoding.UTF8,"application/json")
    Dim RestResponse As Http.HttpResponseMessage = client.PostAsync(RestURL, RestContent).GetAwaiter().GetResult()
   End Sub
End Module

Calling HTTP API Using php

<?php  
$curl = curl_init();
curl_setopt_array($curl, array(
     CURLOPT_URL => 'http://wa.smsidea.com/api/v1/AddWABATemplates',
     CURLOPT_RETURNTRANSFER => true,
     CURLOPT_ENCODING => '',     
     CURLOPT_MAXREDIRS => 10,
     CURLOPT_TIMEOUT => 0, 
     CURLOPT_FOLLOWLOCATION => true,      
     CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
     CURLOPT_CUSTOMREQUEST => 'GET',
     CURLOPT_POSTFIELDS =>
        '{
               "key":"99e7883d76284a53b6b4e8d7e8c8c286",
               "language": "en_US",
               "name":"xds",
               "category":"account_update",
               "components":[
                  {
                   "type": "HEADER",
                   "format": "IMAGE",
                   "example": {
                   "header_handle": [
                    "https://xyz.com/Image/file_example_PNG_3MB.png"
                     ]
                   }
                 },
                 {
                   "type": "BODY",
                   "text": "Your account balance transfer to a/c  {{1}} from a/c{{2}} in branch name {{3}}.",
                   "example": {
                   "body_text": [
                          [
                            "123456789",
                            "987654321",
                            "Ahmedabad"
                          ]
                        ]
                     }
                 },
                 {
                   "type": "FOOTER",
                   "text": "Esta mensagem é de uma empresa não verificada."
                 },
                 {
                    "type":"BUTTONS",
                    "buttons":
                    [{
                          "type": "QUICK_REPLY",
                          "text": "No"
                      },
                      {
                          "type": "QUICK_REPLY",
                          "text": "Yes"
                    }]
                 }]
         }',
    CURLOPT_HTTPHEADER => array('Content-Type: application/json'),
));

$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>

Calling HTTP API Using Java

import java.io.IOException;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;

public void AddWABATemplates() {
    try {
        OkHttpClient client = new OkHttpClient().newBuilder().build();
        MediaType mediaType = MediaType.parse("application/json");
        RequestBody body = RequestBody.create(mediaType,
        '{
               "key":"99e7883d76284a53b6b4e8d7e8c8c286",
               "language": "en_US",
               "name":"xds",
               "category":"account_update",
               "components":[
                  {
                   "type": "HEADER",
                   "format": "IMAGE",
                   "example": {
                   "header_handle": [
                    "https://xyz.com/Image/file_example_PNG_3MB.png"
                     ]
                   }
                 },
                 {
                   "type": "BODY",
                   "text": "Your account balance transfer to a/c  {{1}} from a/c{{2}} in branch name {{3}}.",
                   "example": {
                   "body_text": [
                          [
                            "123456789",
                            "987654321",
                            "Ahmedabad"
                          ]
                        ]
                     }
                 },
                 {
                   "type": "FOOTER",
                   "text": "Esta mensagem é de uma empresa não verificada."
                 },
                 {
                    "type":"BUTTONS",
                    "buttons":
                    [{
                          "type": "QUICK_REPLY",
                          "text": "No"
                      },
                      {
                          "type": "QUICK_REPLY",
                          "text": "Yes"
                    }]
                 }]
         }');
        Request request = new Request.Builder()
          .url(("http://wa.smsidea.com/api/v1/AddWABATemplates"))  
          .method("GET", body)
          .addHeader("Content-Type", "application/json")
          .build();
        Response response = client.newCall(request).execute();
    } 
    catch (Exception ex) {
      ex.printStackTrace();
    }
  }


Calling HTTP API Using VB 6

public Sub Form_Load(strUrl As String)

    Dim strUrl as string = "http://wa.smsidea.com/api/v1/GetWABATemplates"
    Dim jsonText as string 
    jsonText = "{
            ""key""  :  ""AbCdEfGhIjKlMnOpQrStUvWxYz123456"",  
            ""TemplateName"" : ""hello_world"",
            ""languageCode"" : ""en_US"",
            ""status"" : ""approved"",
         }",
    Dim objHttp as Object
    Dim strText as string
    Set objHttp = CreateObject("MSXML2.ServerXMLHTTP")
    objHttp.Open "GET", strUrl, jsonText, False
    objHttp.setRequestHeader "Content-Type","application/json"
    "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
    objHttp.Send
    strText = objHttp.responseText
    Set objHttp = Nothing

End Sub
Sample Response:

{
    "ErrorCode": "000",
    "ErrorMessage": "success",
    "Data": "{\"id\":\"6017dsgrfdh650\"}"
} 
                                                
API Error codes : (If Error code is not present in given list then please Click here)

  • "ErrorCode": "0","ErrorMessage": "AuthException"
  • "ErrorCode": "1","ErrorMessage": "API Unknown"
  • "ErrorCode": "2","ErrorMessage": "API Service"
  • "ErrorCode": "3","ErrorMessage": "API Method"
  • "ErrorCode": "4","ErrorMessage": "API Too Many Calls"
  • "ErrorCode": "10","ErrorMessage": "API Permission Denied"
  • "ErrorCode": "100","ErrorMessage": "Parameter is invalid"
  • "ErrorCode": "190","ErrorMessage": "Access token has expired"
  • "ErrorCode": "200-299","ErrorMessage": "API Permission (Multiple values depending on permission)"
  • "ErrorCode": "200 (subcode=2494049) ","ErrorMessage": "Phone number is not allowed"
  • "ErrorCode": "368","ErrorMessage": "Temporarily blocked for policies violations"
  • "ErrorCode": "506","ErrorMessage": "Duplicate Post"
  • "ErrorCode": "80007","ErrorMessage": "Rate limit issues"
  • "ErrorCode": "131052","ErrorMessage": "Media download error"
  • "ErrorCode": "131042","ErrorMessage": "Business eligibility — Payment issue"
  • "ErrorCode": "131043","ErrorMessage": "Message expired"
  • "ErrorCode": "130429","ErrorMessage": "Rate limit hit"
  • "ErrorCode": "131045","ErrorMessage": "Unsigned certificate"
  • "ErrorCode": "131016","ErrorMessage": "Service Overloaded"
  • "ErrorCode": "131047","ErrorMessage": "Re-engagement message"
  • "ErrorCode": "131048","ErrorMessage": "Spam Rate limit hit"
  • "ErrorCode": "131000","ErrorMessage": "Generic Error"
  • "ErrorCode": "131001","ErrorMessage": "Message too long"
  • "ErrorCode": "131002","ErrorMessage": "Invalid recipient type"
  • "ErrorCode": "131005","ErrorMessage": "Access denied"
  • "ErrorCode": "131006","ErrorMessage": "Resource not found"
  • "ErrorCode": "131008","ErrorMessage": "Required parameter is missing"
  • "ErrorCode": "131009","ErrorMessage": "Parameter value is not valid"
  • "ErrorCode": "131021","ErrorMessage": "Bad User"
  • "ErrorCode": "131031","ErrorMessage": "Account has been locked"
  • "ErrorCode": "131051","ErrorMessage": "Unsupported message type"
  • "ErrorCode": "131055","ErrorMessage": "Method not allowed"
  • "ErrorCode": "132000","ErrorMessage": "Template Param Count Mismatch"
  • "ErrorCode": "132001","ErrorMessage": "Template does not exist"
  • "ErrorCode": "132005","ErrorMessage": "Template Hydrated Text Too Long"
  • "ErrorCode": "132007","ErrorMessage": "Template Format Character Policy Violated"
  • "ErrorCode": "132012","ErrorMessage": "Template Parameter Format Mismatch"
  • "ErrorCode": "133000","ErrorMessage": "Incomplete Delete"
  • "ErrorCode": "133001","ErrorMessage": "Decryption Error"
  • "ErrorCode": "133002","ErrorMessage": "Backup Blob Decryption Error"
  • "ErrorCode": "133003","ErrorMessage": "Recovery Token Decryption Error"
  • "ErrorCode": "133004","ErrorMessage": "Server Temporarily Unavailable"
  • "ErrorCode": "133005","ErrorMessage": "Security PIN Mismatch"
  • "ErrorCode": "133006","ErrorMessage": "Recovery Token Incorrect"
  • "ErrorCode": "133007","ErrorMessage": "Account Blocked"
  • "ErrorCode": "133008","ErrorMessage": "Too Many PIN Guesses"
  • "ErrorCode": "133009","ErrorMessage": "PIN Guessed Too Fast"

  • "ErrorCode": "501","ErrorMessage": "your url is not valid"
  • "ErrorCode": "502","ErrorMessage": "your file is Over Sized"
  • "ErrorCode": "503","ErrorMessage": "file not found"
  • "ErrorCode": "504","ErrorMessage": "your passing parameters are missing or invalid."
  • "ErrorCode": "505","ErrorMessage": "your passing file is invalid."
POST : Send User Initiated Messages
  • Post Parameters
  • Sample API Code
  • Sample Response
  • API Error codes
  • How it works

Request:

http://wa.smsidea.com/api/v1/SendUserInitiatedmsg


Parameters:

Field Description For Example Required
key Your Instance API Key AbCdEfGhIjKlMnOpQrStUvWxYz123456
to to 919999xxxxxx
type type text / Image / video / document / audio / Interactive Message
[ Note :- 1. Image extension .jpeg, .PNG and size 5mb allowed
2. Video extension .mp4, .3gpp and size 16mb allowed
3. Documents extension .pdf and size 100mb allowed
4. Audio extension .aac, .mp4, .amr, .mpeg, and size 16mb allowed
5. Interactive Message type List / Button allowed for more Information check how its work tab ]
text For text type, provide an array with the body parameter. {"preview_url":"false","body":"your text content"}
image For image type,provide an array with the link and caption parameter. {"link":"www.xyz.com","caption":"your caption"}
video For video type,provide an array with the link and caption parameter. {"link":"www.xyz.com","caption":"your caption"}
document For document type,provide an array with the link ,filename and caption parameter. {"link":"www.xyz.com","filename":"your file name","caption":"your caption"}
audio For audio type,provide an array with the link parameter. {"link":"www.xyz.com"}

Interactive Message Parameters:

Field Description For Example Required
key Your Instance API Key AbCdEfGhIjKlMnOpQrStUvWxYz123456
to Recipient Number 919812345678
type Interactive Message type List / Button
headertype header type text / image / video / documents
[ Note :- 1. Image extension .jpeg, .PNG and size 5mb allowed
2. Video extension .mp4, .3gpp and size 16mb allowed
3. Documents extension .pdf and size 100mb allowed ]
headertext header text HEADER_TEXT
bodytext bodytext BODY_TEXT / BUTTON_TEXT
footertext footertext FOOTER_TEXT
button button BUTTON_TEXT
sections title sections title SECTION_1_TITLE
id id SECTION_1_ROW_1_ID
title title SECTION_1_ROW_1_TITLE
description description SECTION_1_ROW_2_DESCRIPTION
  • C#
  • PHP
  • JAVA

Calling HTTP API Using C#.Net

using System;
using RestSharp;

  public void SendUserInitiatedmsg()
   {
       var client = new RestClient("http://wa.smsidea.com/api/v1/SendUserInitiatedmsg");
       client.Timeout = -1;
       var request = new RestRequest(Method.POST);
       request.AddHeader("Content-Type", "application/json");
       var body =  @"{            
	                    'key':'da568fa8f9a04c55a7c0338be5fee29f',             
	                    'to':'919825910960',
	                    'type':'text' | 'image' | 'video' | 'document' | 'audio' | 'Interactive',
	                    'text':{
	                    'preview_url':'false',
	                    'body':'hello everyone'
	                    },
	                    'image':{
		                    'link':'www.xyz.com',
	                    },
	                    'audio':{
		                    'link':'www.xyz.com',
	                    },
	                    'video':{
		                    'link':'www.xyz.com',
		                    'caption':'your caption'
	                    },
	                    'document':{
		                    'link':'www.xyz.com',
		                    'filename':'your filename',
		                    'caption':'your caption'
	                    },
	                    'interactive': {
		                    'type': 'list',
		                    'header': {
		                    'type': 'text' | 'image' | 'video' | 'document',
		                    'text': 'HEADER_TEXT'
		                    },
		                    'body': {
			                    'text': 'BODY_TEXT'
		                    },
		                    'footer': {
			                    'text': 'FOOTER_TEXT'
		                    },
		                    'action': {
			                    'button': 'BUTTON_TEXT',
			                    'sections': [
				                    {
					                    'title': 'SECTION_1_TITLE',
					                    'rows': [
						                    {
							                    'id': 'SECTION_1_ROW_1_ID',
							                    'title': 'SECTION_1_ROW_1_TITLE',
							                    'description': 'SECTION_1_ROW_1_DESCRIPTION'
						                    }                                  
					                    ]
				                    }                          
			                    ]
		                    }
	                    },
	                    'interactive': {
		                    'type': 'button',
		                    'body': {
		                     'text': 'BUTTON_TEXT'
		                    },
		                    'action': {
			                    'buttons': [
				                    {
					                    'type': 'reply',
					                    'reply': {
						                    'id': 'UNIQUE_BUTTON_ID_1',
						                    'title': 'BUTTON_TITLE_1'
					                    }
				                    }                          
			                    ]
		                    }
	                    }                    
                    }";
       request.AddParameter("application/json", body, ParameterType.RequestBody);
       IRestResponse response = client.Execute(request);
       Console.WriteLine(response .Content);
   }

Calling HTTP API Using VB.Net

Imports System.Net
Imports System.Text

Module Program 
   Sub Main (args As String())        
    Dim jsonstring As String = 
     "{
               ""key"":""da568fa8f9a04c55a7c0338be5fee29f"",             
               ""to"":""919825910960"",
               ""type"":""text"" | ""image"" | ""video"" | ""document"" | ""audio"" | ""Interactive Message"",
               ""text"":{
                       ""preview_url"":""false"",
                       ""body"":""hello everyone""
               },
               ""image"":{
                       ""link"":""www.xyz.com"",
               },
               ""audio"":{
                       ""link"":""www.xyz.com"",
               },
               ""video"":{
                       ""link"":""www.xyz.com"",
                       ""caption"":""your caption""
               },
               ""document"":{
                       ""link"":""www.xyz.com"",
                       ""filename"":""your filename"",
                       ""caption"":""your caption""
               }
      }"
    Dim RestURL As String = "http://wa.smsidea.com/api/v1/SendUserInitiatedmsg"
    Dim client As New Http.HttpClient
    Dim RestContent As New Http.StringContent(jsonstring,Encoding.UTF8,"application/json")
    Dim RestResponse As Http.HttpResponseMessage = client.PostAsync(RestURL, RestContent).GetAwaiter().GetResult()
   End Sub
End Module

Calling HTTP API Using php

<?php  
$curl = curl_init();
curl_setopt_array($curl, array(
     CURLOPT_URL => 'http://wa.smsidea.com/api/v1/SendUserInitiatedmsg',
     CURLOPT_RETURNTRANSFER => true,
     CURLOPT_ENCODING => '',     
     CURLOPT_MAXREDIRS => 10,
     CURLOPT_TIMEOUT => 0, 
     CURLOPT_FOLLOWLOCATION => true,      
     CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
     CURLOPT_CUSTOMREQUEST => 'GET',
     CURLOPT_POSTFIELDS =>
        '{            
	        "key":"da568fa8f9a04c55a7c0338be5fee29f",             
	        "to":"919825910960",
	        "type":"text" | "image" | "video" | "document" | "audio" | "Interactive",
	        "text":{
	        "preview_url":"false",
	        "body":"hello everyone"
	        },
	        "image":{
		        "link":"www.xyz.com",
	        },
	        "audio":{
		        "link":"www.xyz.com",
	        },
	        "video":{
		        "link":"www.xyz.com",
		        "caption":"your caption"
	        },
	        "document":{
		        "link":"www.xyz.com",
		        "filename":"your filename",
		        "caption":"your caption"
	        },
	        "interactive": {
		        "type": "list",
		        "header": {
		        "type": "text" | "image" | "video" | "document",
		        "text": "HEADER_TEXT"
		        },
		        "body": {
			        "text": "BODY_TEXT"
		        },
		        "footer": {
			        "text": "FOOTER_TEXT"
		        },
		        "action": {
			        "button": "BUTTON_TEXT",
			        "sections": [
				        {
					        "title": "SECTION_1_TITLE",
					        "rows": [
						        {
							        "id": "SECTION_1_ROW_1_ID",
							        "title": "SECTION_1_ROW_1_TITLE",
							        "description": "SECTION_1_ROW_1_DESCRIPTION"
						        }                                  
					        ]
				        }                          
			        ]
		        }
	        },
	        "interactive": {
		        "type": "button",
		        "body": {
		         "text": "BUTTON_TEXT"
		        },
		        "action": {
			        "buttons": [
				        {
					        "type": "reply",
					        "reply": {
						        "id": "UNIQUE_BUTTON_ID_1",
						        "title": "BUTTON_TITLE_1"
					        }
				        }                          
			        ]
		        }
	        }                    
        }',
    CURLOPT_HTTPHEADER => array('Content-Type: application/json'),
));

$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>

Calling HTTP API Using Java

import java.io.IOException;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;

public void sendTemplateMessage() {
    try {
        OkHttpClient client = new OkHttpClient().newBuilder().build();
        MediaType mediaType = MediaType.parse("application/json");
        RequestBody body = RequestBody.create(mediaType,
        '{            
	        "key":"da568fa8f9a04c55a7c0338be5fee29f",             
	        "to":"919825910960",
	        "type":"text" | "image" | "video" | "document" | "audio" | "Interactive",
	        "text":{
	        "preview_url":"false",
	        "body":"hello everyone"
	        },
	        "image":{
		        "link":"www.xyz.com",
	        },
	        "audio":{
		        "link":"www.xyz.com",
	        },
	        "video":{
		        "link":"www.xyz.com",
		        "caption":"your caption"
	        },
	        "document":{
		        "link":"www.xyz.com",
		        "filename":"your filename",
		        "caption":"your caption"
	        },
	        "interactive": {
		        "type": "list",
		        "header": {
		        "type": "text" | "image" | "video" | "document",
		        "text": "HEADER_TEXT"
		        },
		        "body": {
			        "text": "BODY_TEXT"
		        },
		        "footer": {
			        "text": "FOOTER_TEXT"
		        },
		        "action": {
			        "button": "BUTTON_TEXT",
			        "sections": [
				        {
					        "title": "SECTION_1_TITLE",
					        "rows": [
						        {
							        "id": "SECTION_1_ROW_1_ID",
							        "title": "SECTION_1_ROW_1_TITLE",
							        "description": "SECTION_1_ROW_1_DESCRIPTION"
						        }                                  
					        ]
				        }                          
			        ]
		        }
	        },
	        "interactive": {
		        "type": "button",
		        "body": {
		         "text": "BUTTON_TEXT"
		        },
		        "action": {
			        "buttons": [
				        {
					        "type": "reply",
					        "reply": {
						        "id": "UNIQUE_BUTTON_ID_1",
						        "title": "BUTTON_TITLE_1"
					        }
				        }                          
			        ]
		        }
	        }                    
        }');
        Request request = new Request.Builder()
          .url(("http://wa.smsidea.com/api/v1/SendUserInitiatedmsg"))  
          .method("GET", body)
          .addHeader("Content-Type", "application/json")
          .build();
        Response response = client.newCall(request).execute();
    } 
    catch (Exception ex) {
      ex.printStackTrace();
    }
  }


Calling HTTP API Using VB 6

public Sub Form_Load(strUrl As String)

    Dim strUrl as string = "http://wa.smsidea.com/api/v1/GetWABATemplates"
    Dim jsonText as string 
    jsonText = "{
            ""key""  :  ""AbCdEfGhIjKlMnOpQrStUvWxYz123456"",  
            ""TemplateName"" : ""hello_world"",
            ""languageCode"" : ""en_US"",
            ""status"" : ""approved"",
         }",
    Dim objHttp as Object
    Dim strText as string
    Set objHttp = CreateObject("MSXML2.ServerXMLHTTP")
    objHttp.Open "GET", strUrl, jsonText, False
    objHttp.setRequestHeader "Content-Type","application/json"
    "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
    objHttp.Send
    strText = objHttp.responseText
    Set objHttp = Nothing

End Sub
Sample Response:

{
    "ErrorCode": "000",
    "ErrorMessage": "success",
    "Data": "wamid.HBgMOTE5ODI1OTEwOdkgjhfdsuigtreCNzE0MDQxNkFFQ0VGNkEzAA=="
} 
                                                
API Error codes : (If Error code is not present in given list then please Click here)

  • "ErrorCode": "0","ErrorMessage": "AuthException"
  • "ErrorCode": "1","ErrorMessage": "API Unknown"
  • "ErrorCode": "2","ErrorMessage": "API Service"
  • "ErrorCode": "3","ErrorMessage": "API Method"
  • "ErrorCode": "4","ErrorMessage": "API Too Many Calls"
  • "ErrorCode": "10","ErrorMessage": "API Permission Denied"
  • "ErrorCode": "100","ErrorMessage": "Parameter is invalid"
  • "ErrorCode": "190","ErrorMessage": "Access token has expired"
  • "ErrorCode": "200-299","ErrorMessage": "API Permission (Multiple values depending on permission)"
  • "ErrorCode": "200 (subcode=2494049) ","ErrorMessage": "Phone number is not allowed"
  • "ErrorCode": "368","ErrorMessage": "Temporarily blocked for policies violations"
  • "ErrorCode": "506","ErrorMessage": "Duplicate Post"
  • "ErrorCode": "80007","ErrorMessage": "Rate limit issues"
  • "ErrorCode": "131052","ErrorMessage": "Media download error"
  • "ErrorCode": "131042","ErrorMessage": "Business eligibility — Payment issue"
  • "ErrorCode": "131043","ErrorMessage": "Message expired"
  • "ErrorCode": "130429","ErrorMessage": "Rate limit hit"
  • "ErrorCode": "131045","ErrorMessage": "Unsigned certificate"
  • "ErrorCode": "131016","ErrorMessage": "Service Overloaded"
  • "ErrorCode": "131047","ErrorMessage": "Re-engagement message"
  • "ErrorCode": "131048","ErrorMessage": "Spam Rate limit hit"
  • "ErrorCode": "131000","ErrorMessage": "Generic Error"
  • "ErrorCode": "131001","ErrorMessage": "Message too long"
  • "ErrorCode": "131002","ErrorMessage": "Invalid recipient type"
  • "ErrorCode": "131005","ErrorMessage": "Access denied"
  • "ErrorCode": "131006","ErrorMessage": "Resource not found"
  • "ErrorCode": "131008","ErrorMessage": "Required parameter is missing"
  • "ErrorCode": "131009","ErrorMessage": "Parameter value is not valid"
  • "ErrorCode": "131021","ErrorMessage": "Bad User"
  • "ErrorCode": "131031","ErrorMessage": "Account has been locked"
  • "ErrorCode": "131051","ErrorMessage": "Unsupported message type"
  • "ErrorCode": "131055","ErrorMessage": "Method not allowed"
  • "ErrorCode": "132000","ErrorMessage": "Template Param Count Mismatch"
  • "ErrorCode": "132001","ErrorMessage": "Template does not exist"
  • "ErrorCode": "132005","ErrorMessage": "Template Hydrated Text Too Long"
  • "ErrorCode": "132007","ErrorMessage": "Template Format Character Policy Violated"
  • "ErrorCode": "132012","ErrorMessage": "Template Parameter Format Mismatch"
  • "ErrorCode": "133000","ErrorMessage": "Incomplete Delete"
  • "ErrorCode": "133001","ErrorMessage": "Decryption Error"
  • "ErrorCode": "133002","ErrorMessage": "Backup Blob Decryption Error"
  • "ErrorCode": "133003","ErrorMessage": "Recovery Token Decryption Error"
  • "ErrorCode": "133004","ErrorMessage": "Server Temporarily Unavailable"
  • "ErrorCode": "133005","ErrorMessage": "Security PIN Mismatch"
  • "ErrorCode": "133006","ErrorMessage": "Recovery Token Incorrect"
  • "ErrorCode": "133007","ErrorMessage": "Account Blocked"
  • "ErrorCode": "133008","ErrorMessage": "Too Many PIN Guesses"
  • "ErrorCode": "133009","ErrorMessage": "PIN Guessed Too Fast"

  • "ErrorCode": "501","ErrorMessage": "your url is not valid"
  • "ErrorCode": "502","ErrorMessage": "your file is Over Sized"
  • "ErrorCode": "503","ErrorMessage": "file not found"
  • "ErrorCode": "504","ErrorMessage": "your passing parameters are missing or invalid."
  • "ErrorCode": "505","ErrorMessage": "your passing file is invalid."
Sample Message templates:

Currently, you can send the following InteractiveMessages types:

1.List type JsonBody:

{
  "key":"784bc47gdiorhyghtbe645ab", 
  "to": "919898123456",
  "interactive": {
    "type": "list",
    "header": {
      "type": "text",
      "text": "HEADER_TEXT"
    },
    "body": {
      "text": "BODY_TEXT"
    },
    "footer": {
      "text": "FOOTER_TEXT"
    },
    "action": {
      "button": "BUTTON_TEXT",
      "sections": [
        {
          "title": "SECTION_1_TITLE",
          "rows": [
            {
              "id": "SECTION_1_ROW_1_ID",
              "title": "SECTION_1_ROW_1_TITLE",
              "description": "SECTION_1_ROW_1_DESCRIPTION"
            },
            {
              "id": "SECTION_1_ROW_2_ID",
              "title": "SECTION_1_ROW_2_TITLE",
              "description": "SECTION_1_ROW_2_DESCRIPTION"
            },
            {
              "id": "SECTION_1_ROW_3_ID",
              "title": "SECTION_1_ROW_3_TITLE",
              "description": "SECTION_1_ROW_3_DESCRIPTION"
            },
            {
              "id": "SECTION_1_ROW_4_ID",
              "title": "SECTION_1_ROW_4_TITLE",
              "description": "SECTION_1_ROW_4_DESCRIPTION"
            }
          ]
        },
        {
          "title": "SECTION_2_TITLE",
          "rows": [
            {
              "id": "SECTION_2_ROW_1_ID",
              "title": "SECTION_2_ROW_1_TITLE",
              "description": "SECTION_2_ROW_1_DESCRIPTION"
            },
            {
              "id": "SECTION_2_ROW_2_ID",
              "title": "SECTION_2_ROW_2_TITLE",
              "description": "SECTION_2_ROW_2_DESCRIPTION"
            },
            {
              "id": "SECTION_2_ROW_3_ID",
              "title": "SECTION_2_ROW_3_TITLE",
              "description": "SECTION_2_ROW_3_DESCRIPTION"
            }
          ]
        }
      ]
    }
  }


2.Button type JsonBody:

{
  "key":"784bcrkghfuihgbe645ab",     
  "to": "919898123456",
  "interactive": {
    "type": "button",
    "body": {
      "text": "BUTTON_TEXT"
    },
    "action": {
      "buttons": [
        {
          "type": "reply",
          "reply": {
            "id": "UNIQUE_BUTTON_ID_1",
            "title": "BUTTON_TITLE_1"
          }
        },
        {
          "type": "reply",
          "reply": {
            "id": "UNIQUE_BUTTON_ID_2",
            "title": "BUTTON_TITLE_2"
          }
        }
      ]
    }
  }
}
POST : Send Interactive Messages
  • Post Parameters
  • Sample API Code
  • Sample Response
  • API Error codes
  • How it works

Request:

http://wa.smsidea.com/api/v1/SendInteractiveMessages


Parameters:

Field Description For Example Required
key Your Instance API Key AbCdEfGhIjKlMnOpQrStUvWxYz123456
to Recipient Number 919812345678
type Interactive Message type List / Button
headertype header type Text / Image / video / documents
(Note :- 1. Image extension allowed to .jpeg, .PNG and size 5mb allowed
2. Video extension allowed to .mp4, .3gpp and size 16mb allowed
3.Documents extension allowed to .pdf and size 100mb allowed
)
headertext header text HEADER_TEXT
bodytext bodytext BODY_TEXT / BUTTON_TEXT
footertext footertext FOOTER_TEXT
button button BUTTON_TEXT
sections title sections title SECTION_1_TITLE
id id SECTION_1_ROW_1_ID
title title SECTION_1_ROW_1_TITLE
description description SECTION_1_ROW_2_DESCRIPTION
  • C#
  • PHP
  • JAVA

Calling HTTP API Using C#.Net

using System;
using RestSharp;

  public void SendInteractiveMessages()
   {
       var client = new RestClient("http://wa.smsidea.com/api/v1/SendInteractiveMessages");
       client.Timeout = -1;
       var request = new RestRequest(Method.POST);
       request.AddHeader("Content-Type", "application/json");
       var body =  @"{                      
                        ""key"":""78fdlghfdhgrfdhyg63be645ab"", 
                        ""to"": ""91989812345"",
                        ""interactive"": {
                          ""type"": ""list"",
                          ""header"": {
                            ""type"": ""text"" | ""image"" | ""video"" | ""document"",
                            ""text"": ""HEADER_TEXT""
                          },
                          ""body"": {
                            ""text"": ""BODY_TEXT""
                          },
                          ""footer"": {
                            ""text"": ""FOOTER_TEXT""
                          },
                          ""action"": {
                            ""button"": ""BUTTON_TEXT"",
                            ""sections"": [
                              {
                                ""title"": ""SECTION_1_TITLE"",
                                ""rows"": [
                                  {
                                    ""id"": ""SECTION_1_ROW_1_ID"",
                                    ""title"": ""SECTION_1_ROW_1_TITLE"",
                                    ""description"": ""SECTION_1_ROW_1_DESCRIPTION""
                                  },
                                  {
                                    ""id"": ""SECTION_1_ROW_2_ID"",
                                    ""title"": ""SECTION_1_ROW_2_TITLE"",
                                    ""description"": ""SECTION_1_ROW_2_DESCRIPTION""
                                  },
                                  {
                                    ""id"": ""SECTION_1_ROW_3_ID"",
                                    ""title"": ""SECTION_1_ROW_3_TITLE"",
                                    ""description"": ""SECTION_1_ROW_3_DESCRIPTION""
                                  },
                                  {
                                    ""id"": ""SECTION_1_ROW_4_ID"",
                                    ""title"": ""SECTION_1_ROW_4_TITLE"",
                                    ""description"": ""SECTION_1_ROW_4_DESCRIPTION""
                                  }
                                ]
                              },
                              {
                                ""title"": ""SECTION_2_TITLE"",
                                ""rows"": [
                                  {
                                    ""id"": ""SECTION_2_ROW_1_ID"",
                                    ""title"": ""SECTION_2_ROW_1_TITLE"",
                                    ""description"": ""SECTION_2_ROW_1_DESCRIPTION""
                                  },
                                  {
                                    ""id"": ""SECTION_2_ROW_2_ID"",
                                    ""title"": ""SECTION_2_ROW_2_TITLE"",
                                    ""description"": ""SECTION_2_ROW_2_DESCRIPTION""
                                  },
                                  {
                                    ""id"": ""SECTION_2_ROW_3_ID"",
                                    ""title"": ""SECTION_2_ROW_3_TITLE"",
                                    ""description"": ""SECTION_2_ROW_3_DESCRIPTION""
                                  }
                                ]
                              }
                            ]
                          }
                        }                                       
                    }";
       request.AddParameter("application/json", body, ParameterType.RequestBody);
       IRestResponse response = client.Execute(request);
       Console.WriteLine(response .Content);
   }

Calling HTTP API Using VB.Net

Imports System.Net
Imports System.Text

Module Program 
   Sub Main (args As String())        
    Dim jsonstring As String = 
     "{
         ""key""  :  ""AbCdEfGhIjKlMnOpQrStUvWxYz123456"",
         ""to"" : ""919812345678"",       
         ""url"" : ""https://www.xyz.com//Files/b40633fdec6.pdf"",
         ""filename""  : ""WeAreWorking.jpg"",
         ""title"" : ""title for msg"",
         ""caption"" : ""caption for msg"",                                
         ""buttons""  : [                      
               {
                   ""type"" : ""call"",
                   ""title"" : ""call me"", 
                   ""value"" : ""919812345678""
               },
               {
                   ""type"" : ""url"",
                   ""title"" : ""Visite on"",
                   ""value"" : ""https://www.google.com""
               },
               {
                   ""type"" : ""unsubscribed"",
                   ""title"" : ""unsubscribed""
               },                    
           ],
         ""isUrgent"" : ""false"",
       }"
    Dim RestURL As String = "http://wa.smsidea.com/api/v1/sendButtonMessage"
    Dim client As New Http.HttpClient
    Dim RestContent As New Http.StringContent(jsonstring,Encoding.UTF8,"application/json")
    Dim RestResponse As Http.HttpResponseMessage = client.PostAsync(RestURL, RestContent).GetAwaiter().GetResult()
   End Sub
End Module

Calling HTTP API Using php

<?php                                                            
$curl = curl_init();
curl_setopt_array($curl, array(
     CURLOPT_URL => 'http://wa.smsidea.com/api/v1/SendInteractiveMessages',
     CURLOPT_RETURNTRANSFER => true,
     CURLOPT_ENCODING => '',     
     CURLOPT_MAXREDIRS => 10,
     CURLOPT_TIMEOUT => 0, 
     CURLOPT_FOLLOWLOCATION => true,      
     CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
     CURLOPT_CUSTOMREQUEST => 'POST',
     CURLOPT_POSTFIELDS =>
        '{
                        ""key"":""78fdlghfdhgrfdhyg63be645ab"", 
                        ""to"": ""91989812345"",
                        ""interactive"": {
                          ""type"": ""list"",
                          ""header"": {
                            ""type"": ""text"" | ""image"" | ""video"" | ""document"",
                            ""text"": ""HEADER_TEXT""
                          },
                          ""body"": {
                            ""text"": ""BODY_TEXT""
                          },
                          ""footer"": {
                            ""text"": ""FOOTER_TEXT""
                          },
                          ""action"": {
                            ""button"": ""BUTTON_TEXT"",
                            ""sections"": [
                              {
                                ""title"": ""SECTION_1_TITLE"",
                                ""rows"": [
                                  {
                                    ""id"": ""SECTION_1_ROW_1_ID"",
                                    ""title"": ""SECTION_1_ROW_1_TITLE"",
                                    ""description"": ""SECTION_1_ROW_1_DESCRIPTION""
                                  },
                                  {
                                    ""id"": ""SECTION_1_ROW_2_ID"",
                                    ""title"": ""SECTION_1_ROW_2_TITLE"",
                                    ""description"": ""SECTION_1_ROW_2_DESCRIPTION""
                                  },
                                  {
                                    ""id"": ""SECTION_1_ROW_3_ID"",
                                    ""title"": ""SECTION_1_ROW_3_TITLE"",
                                    ""description"": ""SECTION_1_ROW_3_DESCRIPTION""
                                  },
                                  {
                                    ""id"": ""SECTION_1_ROW_4_ID"",
                                    ""title"": ""SECTION_1_ROW_4_TITLE"",
                                    ""description"": ""SECTION_1_ROW_4_DESCRIPTION""
                                  }
                                ]
                              },
                              {
                                ""title"": ""SECTION_2_TITLE"",
                                ""rows"": [
                                  {
                                    ""id"": ""SECTION_2_ROW_1_ID"",
                                    ""title"": ""SECTION_2_ROW_1_TITLE"",
                                    ""description"": ""SECTION_2_ROW_1_DESCRIPTION""
                                  },
                                  {
                                    ""id"": ""SECTION_2_ROW_2_ID"",
                                    ""title"": ""SECTION_2_ROW_2_TITLE"",
                                    ""description"": ""SECTION_2_ROW_2_DESCRIPTION""
                                  },
                                  {
                                    ""id"": ""SECTION_2_ROW_3_ID"",
                                    ""title"": ""SECTION_2_ROW_3_TITLE"",
                                    ""description"": ""SECTION_2_ROW_3_DESCRIPTION""
                                  }
                                ]
                              }
                            ]
                          }
                        } 
         }',
    CURLOPT_HTTPHEADER => array('Content-Type: application/json'),
));

$response = curl_exec($curl);
curl_close($curl);
echo $response;

?>

Calling HTTP API Using Java

import java.io.IOException;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;

public void SendInteractiveMessages() {
    try {
        OkHttpClient client = new OkHttpClient().newBuilder().build();
        MediaType mediaType = MediaType.parse("application/json");
        RequestBody body = RequestBody.create(mediaType,
        "{
                        ""key"":""78fdlghfdhgrfdhyg63be645ab"", 
                        ""to"": ""91989812345"",
                        ""interactive"": {
                          ""type"": ""list"",
                          ""header"": {
                            ""type"": ""text"" | ""image"" | ""video"" | ""document"",
                            ""text"": ""HEADER_TEXT""
                          },
                          ""body"": {
                            ""text"": ""BODY_TEXT""
                          },
                          ""footer"": {
                            ""text"": ""FOOTER_TEXT""
                          },
                          ""action"": {
                            ""button"": ""BUTTON_TEXT"",
                            ""sections"": [
                              {
                                ""title"": ""SECTION_1_TITLE"",
                                ""rows"": [
                                  {
                                    ""id"": ""SECTION_1_ROW_1_ID"",
                                    ""title"": ""SECTION_1_ROW_1_TITLE"",
                                    ""description"": ""SECTION_1_ROW_1_DESCRIPTION""
                                  },
                                  {
                                    ""id"": ""SECTION_1_ROW_2_ID"",
                                    ""title"": ""SECTION_1_ROW_2_TITLE"",
                                    ""description"": ""SECTION_1_ROW_2_DESCRIPTION""
                                  },
                                  {
                                    ""id"": ""SECTION_1_ROW_3_ID"",
                                    ""title"": ""SECTION_1_ROW_3_TITLE"",
                                    ""description"": ""SECTION_1_ROW_3_DESCRIPTION""
                                  },
                                  {
                                    ""id"": ""SECTION_1_ROW_4_ID"",
                                    ""title"": ""SECTION_1_ROW_4_TITLE"",
                                    ""description"": ""SECTION_1_ROW_4_DESCRIPTION""
                                  }
                                ]
                              },
                              {
                                ""title"": ""SECTION_2_TITLE"",
                                ""rows"": [
                                  {
                                    ""id"": ""SECTION_2_ROW_1_ID"",
                                    ""title"": ""SECTION_2_ROW_1_TITLE"",
                                    ""description"": ""SECTION_2_ROW_1_DESCRIPTION""
                                  },
                                  {
                                    ""id"": ""SECTION_2_ROW_2_ID"",
                                    ""title"": ""SECTION_2_ROW_2_TITLE"",
                                    ""description"": ""SECTION_2_ROW_2_DESCRIPTION""
                                  },
                                  {
                                    ""id"": ""SECTION_2_ROW_3_ID"",
                                    ""title"": ""SECTION_2_ROW_3_TITLE"",
                                    ""description"": ""SECTION_2_ROW_3_DESCRIPTION""
                                  }
                                ]
                              }
                            ]
                          }
                        } 
         }");
        Request request = new Request.Builder()
          .url(("http://wa.smsidea.com/api/v1/SendInteractiveMessages"))  
          .method("POST", body)
          .addHeader("Content-Type", "application/json")
          .build();
        Response response = client.newCall(request).execute();
    } 
    catch (Exception ex) {
      ex.printStackTrace();
    }
  }


Calling HTTP API Using VB 6

public Sub Form_Load(strUrl As String)

    Dim strUrl as string = "http://wa.smsidea.com/api/v1/SendInteractiveMessages"
    Dim jsonText as string 
    jsonText = "{
            ""key""  :  ""AbCdEfGhIjKlMnOpQrStUvWxYz123456"",
            ""to"" : ""919812345678"",    
            ""languageCode"" : ""en_US"",
            ""TemplateName"" : ""sample_Template"",
            ""headertype"" : ""image"",
            ""link"" : ""https://www.xyz.com//Files/b4063f333fdec6.jpeg"",
            ""filename""  : """",
            ""headertext"" : """",                                                       
            ""BodyParameter""  : [                      
                  {
                      ""type"" : ""text"",
                      ""text"" : ""1""                                  
                  },
                 {
                      ""type"" : ""text"",
                      ""text"" : ""2""                                  
                  },
                 {
                      ""type"" : ""text"",
                      ""text"" : ""3""                                  
                  },   
                  {
                      ""type"" : ""text"",
                      ""text"" : ""4""                                  
                  }
              ] 
                }"
    Dim objHttp as Object
    Dim strText as string
    Set objHttp = CreateObject("MSXML2.ServerXMLHTTP")
    objHttp.Open "POST", strUrl, jsonText, False
    objHttp.setRequestHeader "Content-Type","application/json"
    "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
    objHttp.Send
    strText = objHttp.responseText
    Set objHttp = Nothing

End Sub
Sample Response:

{
"ErrorCode": "000",
"ErrorMessage": "success",
"Data": [
    {
      "key": "AbCdEfGhIjKlMnOpQrStUvWxYz123456",
      "InstanceNumber": "919228489887",
      "mobileNumber": "919825454544"
      "MaskId": "d7475b7c48044366b4dsjgjd48265"     
    }
  ]
}
                                                
API Error codes : (If Error code is not present in given list then please Click here)

  • "ErrorCode": "0","ErrorMessage": "AuthException"
  • "ErrorCode": "1","ErrorMessage": "API Unknown"
  • "ErrorCode": "2","ErrorMessage": "API Service"
  • "ErrorCode": "3","ErrorMessage": "API Method"
  • "ErrorCode": "4","ErrorMessage": "API Too Many Calls"
  • "ErrorCode": "10","ErrorMessage": "API Permission Denied"
  • "ErrorCode": "100","ErrorMessage": "Parameter is invalid"
  • "ErrorCode": "190","ErrorMessage": "Access token has expired"
  • "ErrorCode": "200-299","ErrorMessage": "API Permission (Multiple values depending on permission)"
  • "ErrorCode": "200 (subcode=2494049) ","ErrorMessage": "Phone number is not allowed"
  • "ErrorCode": "368","ErrorMessage": "Temporarily blocked for policies violations"
  • "ErrorCode": "506","ErrorMessage": "Duplicate Post"
  • "ErrorCode": "80007","ErrorMessage": "Rate limit issues"
  • "ErrorCode": "131052","ErrorMessage": "Media download error"
  • "ErrorCode": "131042","ErrorMessage": "Business eligibility — Payment issue"
  • "ErrorCode": "131043","ErrorMessage": "Message expired"
  • "ErrorCode": "130429","ErrorMessage": "Rate limit hit"
  • "ErrorCode": "131045","ErrorMessage": "Unsigned certificate"
  • "ErrorCode": "131016","ErrorMessage": "Service Overloaded"
  • "ErrorCode": "131047","ErrorMessage": "Re-engagement message"
  • "ErrorCode": "131048","ErrorMessage": "Spam Rate limit hit"
  • "ErrorCode": "131000","ErrorMessage": "Generic Error"
  • "ErrorCode": "131001","ErrorMessage": "Message too long"
  • "ErrorCode": "131002","ErrorMessage": "Invalid recipient type"
  • "ErrorCode": "131005","ErrorMessage": "Access denied"
  • "ErrorCode": "131006","ErrorMessage": "Resource not found"
  • "ErrorCode": "131008","ErrorMessage": "Required parameter is missing"
  • "ErrorCode": "131009","ErrorMessage": "Parameter value is not valid"
  • "ErrorCode": "131021","ErrorMessage": "Bad User"
  • "ErrorCode": "131031","ErrorMessage": "Account has been locked"
  • "ErrorCode": "131051","ErrorMessage": "Unsupported message type"
  • "ErrorCode": "131055","ErrorMessage": "Method not allowed"
  • "ErrorCode": "132000","ErrorMessage": "Template Param Count Mismatch"
  • "ErrorCode": "132001","ErrorMessage": "Template does not exist"
  • "ErrorCode": "132005","ErrorMessage": "Template Hydrated Text Too Long"
  • "ErrorCode": "132007","ErrorMessage": "Template Format Character Policy Violated"
  • "ErrorCode": "132012","ErrorMessage": "Template Parameter Format Mismatch"
  • "ErrorCode": "133000","ErrorMessage": "Incomplete Delete"
  • "ErrorCode": "133001","ErrorMessage": "Decryption Error"
  • "ErrorCode": "133002","ErrorMessage": "Backup Blob Decryption Error"
  • "ErrorCode": "133003","ErrorMessage": "Recovery Token Decryption Error"
  • "ErrorCode": "133004","ErrorMessage": "Server Temporarily Unavailable"
  • "ErrorCode": "133005","ErrorMessage": "Security PIN Mismatch"
  • "ErrorCode": "133006","ErrorMessage": "Recovery Token Incorrect"
  • "ErrorCode": "133007","ErrorMessage": "Account Blocked"
  • "ErrorCode": "133008","ErrorMessage": "Too Many PIN Guesses"
  • "ErrorCode": "133009","ErrorMessage": "PIN Guessed Too Fast"

  • "ErrorCode": "501","ErrorMessage": "your url is not valid"
  • "ErrorCode": "502","ErrorMessage": "your file is Over Sized"
  • "ErrorCode": "503","ErrorMessage": "file not found"
  • "ErrorCode": "504","ErrorMessage": "your passing parameters are missing or invalid."
  • "ErrorCode": "505","ErrorMessage": "your passing file is invalid."
Sample Message templates:

Currently, you can send the following SendInteractiveMessages types:

1.List type JsonBody:

{
  "key":"784bc47gdiorhyghtbe645ab", 
  "to": "919898123456",
  "interactive": {
    "type": "list",
    "header": {
      "type": "text",
      "text": "HEADER_TEXT"
    },
    "body": {
      "text": "BODY_TEXT"
    },
    "footer": {
      "text": "FOOTER_TEXT"
    },
    "action": {
      "button": "BUTTON_TEXT",
      "sections": [
        {
          "title": "SECTION_1_TITLE",
          "rows": [
            {
              "id": "SECTION_1_ROW_1_ID",
              "title": "SECTION_1_ROW_1_TITLE",
              "description": "SECTION_1_ROW_1_DESCRIPTION"
            },
            {
              "id": "SECTION_1_ROW_2_ID",
              "title": "SECTION_1_ROW_2_TITLE",
              "description": "SECTION_1_ROW_2_DESCRIPTION"
            },
            {
              "id": "SECTION_1_ROW_3_ID",
              "title": "SECTION_1_ROW_3_TITLE",
              "description": "SECTION_1_ROW_3_DESCRIPTION"
            },
            {
              "id": "SECTION_1_ROW_4_ID",
              "title": "SECTION_1_ROW_4_TITLE",
              "description": "SECTION_1_ROW_4_DESCRIPTION"
            }
          ]
        },
        {
          "title": "SECTION_2_TITLE",
          "rows": [
            {
              "id": "SECTION_2_ROW_1_ID",
              "title": "SECTION_2_ROW_1_TITLE",
              "description": "SECTION_2_ROW_1_DESCRIPTION"
            },
            {
              "id": "SECTION_2_ROW_2_ID",
              "title": "SECTION_2_ROW_2_TITLE",
              "description": "SECTION_2_ROW_2_DESCRIPTION"
            },
            {
              "id": "SECTION_2_ROW_3_ID",
              "title": "SECTION_2_ROW_3_TITLE",
              "description": "SECTION_2_ROW_3_DESCRIPTION"
            }
          ]
        }
      ]
    }
  }


2.Button type JsonBody:

{
  "key":"784bcrkghfuihgbe645ab",     
  "to": "919898123456",
  "interactive": {
    "type": "button",
    "body": {
      "text": "BUTTON_TEXT"
    },
    "action": {
      "buttons": [
        {
          "type": "reply",
          "reply": {
            "id": "UNIQUE_BUTTON_ID_1",
            "title": "BUTTON_TITLE_1"
          }
        },
        {
          "type": "reply",
          "reply": {
            "id": "UNIQUE_BUTTON_ID_2",
            "title": "BUTTON_TITLE_2"
          }
        }
      ]
    }
  }
}
GET : Get Templates
  • GET Parameters
  • Sample API Code
  • Sample Response
  • API Error codes

Request:

http://wa.smsidea.com/api/v1/GetWABATemplates


Parameters:

Field Description For Example Required
key Your Instance API Key AbCdEfGhIjKlMnOpQrStUvWxYz123456
templatename Template Name hello_world
language Language Code en_US
status Add status of template name. APPROVED / IN_APPEAL / PENDING / REJECTED / PENDING_DELETION /DELETED / DISABLED / PAUSED/LIMIT_EXCEEDED
  • C#
  • PHP
  • JAVA

Calling HTTP API Using C#.Net

using System;
using RestSharp;

  public void GetWABATemplates()
   {
       string key = "AbCdEfGhIjKlMnOpQrStUvWxYz123456";
       string templatename = "hello_world";

       var client = new RestClient("http://wa.smsidea.com/api/v1/GetWABATemplates?key="+key+"&templatename="+templatename);
       client.Timeout = -1;
       var request = new RestRequest(Method.GET);
       IRestResponse response = client.Execute(request);
       Console.WriteLine(response .Content);
   }

Calling HTTP API Using VB.Net

Imports System.Net
Imports System.Text

Module Program 
   Sub Main (args As String())        
    Dim jsonstring As String = 
     "{
         ""key""  :  ""AbCdEfGhIjKlMnOpQrStUvWxYz123456"",
         ""to"" : ""919999XXXXXX"",       
         ""type"" : ""text"",
         ""text"" :{
                    "preview_url":"false",
                    "body":"hello everyone"
                   },
       }"
    Dim RestURL As String = "http://wa.smsidea.com/api/v1/sendButtonMessage"
    Dim client As New Http.HttpClient
    Dim RestContent As New Http.StringContent(jsonstring,Encoding.UTF8,"application/json")
    Dim RestResponse As Http.HttpResponseMessage = client.PostAsync(RestURL, RestContent).GetAwaiter().GetResult()
   End Sub
End Module

Calling HTTP API Using php

<?php
$curl = curl_init();

curl_setopt_array($curl,array(
     CURLOPT_URL => 'http://wa.smsidea.com/api/v1/GetWABATemplates?key=your_API_key&templatename=hello_world',
     CURLOPT_RETURNTRANSFER => true,
     CURLOPT_ENCODING => '',
     CURLOPT_MAXREDIRS => 10,
     CURLOPT_TIMEOUT => 0,
     CURLOPT_FOLLOWLOCATION => true,
     CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
     CURLOPT_CUSTOMREQUEST => 'GET',
));

$response = curl_exec($curl);
curl_close($curl);
echo $response;

?>

Calling HTTP API Using Java

import java.io.IOException;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;

public void GetWABATemplates() {
    try {
          OkHttpClient client = new OkHttpClient().newBuilder().build();
          Request request = new Request.Builder()
            .url("http://wa.smsidea.com/api/v1/GetWABATemplates?key=your_API_key&templatename=hello_world")    
            .method("GET", null)
            .build();
          Response response = client.newCall(request).execute();
        }
    catch (Exception ex) {
        ex.printStackTrace();
      }
    }


Calling HTTP API Using VB 6

public Sub Form_Load(strUrl As String)

    Dim strUrl as string = "http://wa.smsidea.com/api/v1/GetWABATemplates"
    Dim jsonText as string 
    jsonText =  "{
         ""key""  :  ""AbCdEfGhIjKlMnOpQrStUvWxYz123456"",
         ""to"" : ""919999XXXXXX"",       
         ""type"" : ""text"",
         ""text"" :{
                    "preview_url":"false",
                    "body":"hello everyone"
                   },
       }",
    Dim objHttp as Object
    Dim strText as string
    Set objHttp = CreateObject("MSXML2.ServerXMLHTTP")
    objHttp.Open "GET", strUrl, jsonText, False
    objHttp.setRequestHeader "Content-Type","application/json"
    "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
    objHttp.Send
    strText = objHttp.responseText
    Set objHttp = Nothing

End Sub
Sample Response:

{
    "ErrorCode": "000",
    "ErrorMessage": "success",
    "Data":"{\"data\":[{\"name\":\"hello_world\",\"components\":[{\"type\":\"HEADER\",\"format\":\"TEXT\",\"text\":\"Hello World\"},{\"type\":\"BODY\",\"text\":\"Welcome and congratulations!! This message demonstrates your ability to send a message notification from WhatsApp Business Platform\’s Cloud API. Thank you for taking the time to test with us.\"},{\"type\":\"FOOTER\",\"text\":\"WhatsApp Business API Team\"}],\"language\":\"en_US\",\"status\":\"APPROVED\",\"category\":\"ACCOUNT_UPDATE\",\"id\":\"6000811739935421\"}]}"
} 
                                                
API Error codes : (If Error code is not present in given list then please Click here)

  • "ErrorCode": "0","ErrorMessage": "AuthException"
  • "ErrorCode": "1","ErrorMessage": "API Unknown"
  • "ErrorCode": "2","ErrorMessage": "API Service"
  • "ErrorCode": "3","ErrorMessage": "API Method"
  • "ErrorCode": "4","ErrorMessage": "API Too Many Calls"
  • "ErrorCode": "10","ErrorMessage": "API Permission Denied"
  • "ErrorCode": "100","ErrorMessage": "Parameter is invalid"
  • "ErrorCode": "190","ErrorMessage": "Access token has expired"
  • "ErrorCode": "200-299","ErrorMessage": "API Permission (Multiple values depending on permission)"
  • "ErrorCode": "200 (subcode=2494049) ","ErrorMessage": "Phone number is not allowed"
  • "ErrorCode": "368","ErrorMessage": "Temporarily blocked for policies violations"
  • "ErrorCode": "506","ErrorMessage": "Duplicate Post"
  • "ErrorCode": "80007","ErrorMessage": "Rate limit issues"
  • "ErrorCode": "131052","ErrorMessage": "Media download error"
  • "ErrorCode": "131042","ErrorMessage": "Business eligibility — Payment issue"
  • "ErrorCode": "131043","ErrorMessage": "Message expired"
  • "ErrorCode": "130429","ErrorMessage": "Rate limit hit"
  • "ErrorCode": "131045","ErrorMessage": "Unsigned certificate"
  • "ErrorCode": "131016","ErrorMessage": "Service Overloaded"
  • "ErrorCode": "131047","ErrorMessage": "Re-engagement message"
  • "ErrorCode": "131048","ErrorMessage": "Spam Rate limit hit"
  • "ErrorCode": "131000","ErrorMessage": "Generic Error"
  • "ErrorCode": "131001","ErrorMessage": "Message too long"
  • "ErrorCode": "131002","ErrorMessage": "Invalid recipient type"
  • "ErrorCode": "131005","ErrorMessage": "Access denied"
  • "ErrorCode": "131006","ErrorMessage": "Resource not found"
  • "ErrorCode": "131008","ErrorMessage": "Required parameter is missing"
  • "ErrorCode": "131009","ErrorMessage": "Parameter value is not valid"
  • "ErrorCode": "131021","ErrorMessage": "Bad User"
  • "ErrorCode": "131031","ErrorMessage": "Account has been locked"
  • "ErrorCode": "131051","ErrorMessage": "Unsupported message type"
  • "ErrorCode": "131055","ErrorMessage": "Method not allowed"
  • "ErrorCode": "132000","ErrorMessage": "Template Param Count Mismatch"
  • "ErrorCode": "132001","ErrorMessage": "Template does not exist"
  • "ErrorCode": "132005","ErrorMessage": "Template Hydrated Text Too Long"
  • "ErrorCode": "132007","ErrorMessage": "Template Format Character Policy Violated"
  • "ErrorCode": "132012","ErrorMessage": "Template Parameter Format Mismatch"
  • "ErrorCode": "133000","ErrorMessage": "Incomplete Delete"
  • "ErrorCode": "133001","ErrorMessage": "Decryption Error"
  • "ErrorCode": "133002","ErrorMessage": "Backup Blob Decryption Error"
  • "ErrorCode": "133003","ErrorMessage": "Recovery Token Decryption Error"
  • "ErrorCode": "133004","ErrorMessage": "Server Temporarily Unavailable"
  • "ErrorCode": "133005","ErrorMessage": "Security PIN Mismatch"
  • "ErrorCode": "133006","ErrorMessage": "Recovery Token Incorrect"
  • "ErrorCode": "133007","ErrorMessage": "Account Blocked"
  • "ErrorCode": "133008","ErrorMessage": "Too Many PIN Guesses"
  • "ErrorCode": "133009","ErrorMessage": "PIN Guessed Too Fast"

  • "ErrorCode": "501","ErrorMessage": "your url is not valid"
  • "ErrorCode": "502","ErrorMessage": "your file is Over Sized"
  • "ErrorCode": "503","ErrorMessage": "file not found"
  • "ErrorCode": "504","ErrorMessage": "your passing parameters are missing or invalid."
  • "ErrorCode": "505","ErrorMessage": "your passing file is invalid."
GET : Get/Set Webhook EndPoint
  • Get Parameters
  • HTTP API Call
  • Sample API Code
  • Sample Response
  • API Error codes
  • Webhook Payload sample

Request:

http://wa.smsidea.com/api/v1/SetWebhookEndPoint


Parameters:

Field Description For Example Required
key Your Instance API key AbCdEfGhIjKlMnOpQrStUvWxYz123456
WebhookEndpoint Your Webhook End point http://triangle.xyz.com/api/v1/HookTestDemo
A sample HTTP API Call would be:
http://wa.smsidea.com/api/v1/SetWebhookEndPoint?key=your_api_key

For Example:

http://wa.smsidea.com/api/v1/SetWebhookEndPoint?key=AbCdEfGhIjKlMnOpQrStUvWxYz123456

  • C#
  • PHP
  • JAVA

Calling HTTP API Using C#.Net

using System;
using RestSharp;

  public void SetWebhookEndPoint()
   {
       string key = "AbCdEfGhIjKlMnOpQrStUvWxYz123456";

       var client = new RestClient("http://wa.smsidea.com/api/v1/SetWebhookEndPoint?key="+key);
       client.Timeout = -1;
       var request = new RestRequest(Method.GET);
       IRestResponse response = client.Execute(request);
       Console.WriteLine(response .Content);
   }

Calling HTTP API Using VB.Net

Imports System.Net

Module Program 
   Sub Main (args As String())
    Dim WebRequest As Net.WebRequest
    Dim WebResonse As Net.WebResponse
'Masterkey that is to be used for submission Dim key As String = "AbCdEfGhIjKlMnOpQrStUvWxYz123456" Dim WebResponseString As String = ""
Dim URL As String = "http://wa.smsidea.com/api/v1/GetConnectionStatus?key="+key WebRequest = Net.HttpWebRequest.Create(URL) 'Hit URL Link WebRequest.Timeout = 25000
Try WebResonse = WebRequest.GetResponse 'Get Response Dim reader As IO.StreamReader = New IO.StreamReader(WebResonse.GetResponseStream) 'Read Response and store in variable WebResponseString = reader.ReadToEnd() WebResonse.Close() Catch ex As Exception WebResponseString = "Request Timeout" 'If any exception occur. End Try End Sub End Module

Calling HTTP API Using php

<?php
$curl = curl_init();

curl_setopt_array($curl,array(
     CURLOPT_URL => 'http://wa.smsidea.com/api/v1/SetWebhookEndPoint?key=your_API_key',
     CURLOPT_RETURNTRANSFER => true,
     CURLOPT_ENCODING => '',
     CURLOPT_MAXREDIRS => 10,
     CURLOPT_TIMEOUT => 0,
     CURLOPT_FOLLOWLOCATION => true,
     CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
     CURLOPT_CUSTOMREQUEST => 'GET',
));

$response = curl_exec($curl);
curl_close($curl);
echo $response;

?>

Calling HTTP API Using Java

import java.io.IOException;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;

public void SetWebhookEndPoint() {
    try {
          OkHttpClient client = new OkHttpClient().newBuilder().build();
          Request request = new Request.Builder()
            .url("http://wa.smsidea.com/api/v1/SetWebhookEndPoint?key=your_API_key")    
            .method("GET", null)
            .build();
          Response response = client.newCall(request).execute();
        }
    catch (Exception ex) {
        ex.printStackTrace();
      }
    }


Calling HTTP API Using VB 6

public Sub Form_Load()

    Dim strUrl as string = "http://wa.smsidea.com/api/v1/GetConnectionStatus?key=your_API_key"
    Dim objHttp as Object, strText as string

    Set objHttp = CreateObject("MSXML2.ServerXMLHTTP")
    objHttp.Open "GET", strUrl, False
    objHttp.setRequestHeader "User-Agent", _
    "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
    objHttp.Send ("")
    strText = objHttp.responseText
    Set objHttp = Nothing

End Sub
Sample Response:

{
   "ErrorCode": "000",
   "ErrorMessage": "success",
   "Data": "https://d16b-100-100-66-255.ngrok.io/api/v1/ResponceMessageHook"
} 
                                                
API Error codes : (If Error code is not present in given list then please Click here)

  • "ErrorCode": "0","ErrorMessage": "AuthException"
  • "ErrorCode": "1","ErrorMessage": "API Unknown"
  • "ErrorCode": "2","ErrorMessage": "API Service"
  • "ErrorCode": "3","ErrorMessage": "API Method"
  • "ErrorCode": "4","ErrorMessage": "API Too Many Calls"
  • "ErrorCode": "10","ErrorMessage": "API Permission Denied"
  • "ErrorCode": "100","ErrorMessage": "Parameter is invalid"
  • "ErrorCode": "190","ErrorMessage": "Access token has expired"
  • "ErrorCode": "200-299","ErrorMessage": "API Permission (Multiple values depending on permission)"
  • "ErrorCode": "200 (subcode=2494049) ","ErrorMessage": "Phone number is not allowed"
  • "ErrorCode": "368","ErrorMessage": "Temporarily blocked for policies violations"
  • "ErrorCode": "506","ErrorMessage": "Duplicate Post"
  • "ErrorCode": "80007","ErrorMessage": "Rate limit issues"
  • "ErrorCode": "131052","ErrorMessage": "Media download error"
  • "ErrorCode": "131042","ErrorMessage": "Business eligibility — Payment issue"
  • "ErrorCode": "131043","ErrorMessage": "Message expired"
  • "ErrorCode": "130429","ErrorMessage": "Rate limit hit"
  • "ErrorCode": "131045","ErrorMessage": "Unsigned certificate"
  • "ErrorCode": "131016","ErrorMessage": "Service Overloaded"
  • "ErrorCode": "131047","ErrorMessage": "Re-engagement message"
  • "ErrorCode": "131048","ErrorMessage": "Spam Rate limit hit"
  • "ErrorCode": "131000","ErrorMessage": "Generic Error"
  • "ErrorCode": "131001","ErrorMessage": "Message too long"
  • "ErrorCode": "131002","ErrorMessage": "Invalid recipient type"
  • "ErrorCode": "131005","ErrorMessage": "Access denied"
  • "ErrorCode": "131006","ErrorMessage": "Resource not found"
  • "ErrorCode": "131008","ErrorMessage": "Required parameter is missing"
  • "ErrorCode": "131009","ErrorMessage": "Parameter value is not valid"
  • "ErrorCode": "131021","ErrorMessage": "Bad User"
  • "ErrorCode": "131031","ErrorMessage": "Account has been locked"
  • "ErrorCode": "131051","ErrorMessage": "Unsupported message type"
  • "ErrorCode": "131055","ErrorMessage": "Method not allowed"
  • "ErrorCode": "132000","ErrorMessage": "Template Param Count Mismatch"
  • "ErrorCode": "132001","ErrorMessage": "Template does not exist"
  • "ErrorCode": "132005","ErrorMessage": "Template Hydrated Text Too Long"
  • "ErrorCode": "132007","ErrorMessage": "Template Format Character Policy Violated"
  • "ErrorCode": "132012","ErrorMessage": "Template Parameter Format Mismatch"
  • "ErrorCode": "133000","ErrorMessage": "Incomplete Delete"
  • "ErrorCode": "133001","ErrorMessage": "Decryption Error"
  • "ErrorCode": "133002","ErrorMessage": "Backup Blob Decryption Error"
  • "ErrorCode": "133003","ErrorMessage": "Recovery Token Decryption Error"
  • "ErrorCode": "133004","ErrorMessage": "Server Temporarily Unavailable"
  • "ErrorCode": "133005","ErrorMessage": "Security PIN Mismatch"
  • "ErrorCode": "133006","ErrorMessage": "Recovery Token Incorrect"
  • "ErrorCode": "133007","ErrorMessage": "Account Blocked"
  • "ErrorCode": "133008","ErrorMessage": "Too Many PIN Guesses"
  • "ErrorCode": "133009","ErrorMessage": "PIN Guessed Too Fast"

  • "ErrorCode": "501","ErrorMessage": "your url is not valid"
  • "ErrorCode": "502","ErrorMessage": "your file is Over Sized"
  • "ErrorCode": "503","ErrorMessage": "file not found"
  • "ErrorCode": "504","ErrorMessage": "your passing parameters are missing or invalid."
  • "ErrorCode": "505","ErrorMessage": "your passing file is invalid."
Sample Message templates:

Webhook Notification Payload Examples:

1.Text Messages:

{
  "object": "whatsapp_business_account",
  "entry": [{
      "id": "WHATSAPP_BUSINESS_ACCOUNT_ID",
      "changes": [{
          "value": {
              "messaging_product": "whatsapp",
              "metadata": {
                  "display_phone_number": PHONE_NUMBER,
                  "phone_number_id": PHONE_NUMBER_ID
              },
              "contacts": [{
                  "profile": {
                    "name": "NAME"
                  },
                  "wa_id": PHONE_NUMBER
                }],
              "messages": [{
                  "from": PHONE_NUMBER,
                  "id": "wamid.ID",
                  "timestamp": TIMESTAMP,
                  "text": {
                    "body": "MESSAGE_BODY"
                  },
                  "type": "text"
                }]
          },
          "field": "messages"
        }]
  }]
}


2.Media Messages:

{
  "object": "whatsapp_business_account",
  "entry": [{
      "id": "WHATSAPP_BUSINESS_ACCOUNT_ID",
      "changes": [{
          "value": {
              "messaging_product": "whatsapp",
              "metadata": {
                  "display_phone_number": PHONE_NUMBER,
                  "phone_number_id": PHONE_NUMBER_ID
              },
              "contacts": [{
                  "profile": {
                    "name": "NAME"
                  },
                  "wa_id": "WHATSAPP_ID"
                }],
              "messages": [{
                  "from": PHONE_NUMBER,
                  "id": "wamid.ID",
                  "timestamp": TIMESTAMP,
                  "type": "image",
                  "image": {
                    "caption": "CAPTION",
                    "mime_type": "image/jpeg",
                    "sha256": "IMAGE_HASH",
                    "id": "ID"
                  }
                }]
          },
          "field": "messages"
        }]
    }]
}

When you receive a sticker, you will get the following notification:

{
  "object": "whatsapp_business_account",
  "entry": [
    {
      "id": "ID",
      "changes": [
        {
          "value": {
            "messaging_product": "whatsapp",
            "metadata": {
              "display_phone_number": "PHONE_NUMBER",
              "phone_number_id": "PHONE_NUMBER_ID"
            },
            "contacts": [
              {
                "profile": {
                  "name": "NAME"
                },
                "wa_id": "ID"
              }
            ],
            "messages": [
              {
                "from": "SENDER_PHONE_NUMBER",
                "id": "wamid.ID",
                "timestamp": "TIMESTAMP",
                "type": "sticker",
                "sticker": {
                  "mime_type": "image/webp",
                  "sha256": "HASH",
                  "id": "ID"
                }
              }
            ]
          },
          "field": "messages"
        }
      ]
    }
  ]
}

3.Unknown Messages:

{
  "object": "whatsapp_business_account",
  "entry": [{
      "id": "WHATSAPP_BUSINESS_ACCOUNT_ID",
      "changes": [{
          "value": {
              "messaging_product": "whatsapp",
              "metadata": { 
                "display_phone_number": "PHONE_NUMBER", 
                "phone_number_id": "PHONE_NUMBER_ID" 
              },
              "contacts": [{
                  "profile": { 
                    "name": "NAME" 
                  }, 
                  "wa_id": "WHATSAPP_ID"
                }],
              "messages": [{
                  "from": "PHONE_NUMBER",
                  "id": "wamid.ID", 
                  "timestamp": "TIMESTAMP",
                  "errors": [ 
                    { 
                      "code": 131051, 
                      "details": "Message type is not currently supported",
                      "title": "Unsupported message type"
                    }],
                   "type": "unknown"
                   }]
            }
            "field": "messages"
        }],
    }]
}


4.Contacts Messages:

{
  "object":"whatsapp_business_account",
  "entry":[{
    "id":"WHATSAPP_BUSINESS_ACCOUNT_ID",
    "changes":[{
      "value":{
        "messaging_product":"whatsapp",
        "metadata": {
          "display_phone_number":"PHONE_NUMBER",
          "phone_number_id":"PHONE_NUMBER_ID"
          },
        "contacts": [{
          "profile":{
            "name":"NAME"
            },
          "wa_id":"WHATSAPP_ID"
          }],
        "messages":[{
          "from":"PHONE_NUMBER",
          "id":"wamid.ID",
          "timestamp":"TIMESTAMP",
          "contacts":[{
            "addresses":[{
              "city":"CONTACT_CITY",
              "country":"CONTACT_COUNTRY",
              "country_code":"CONTACT_COUNTRY_CODE",
              "state":"CONTACT_STATE",
              "street":"CONTACT_STREET",
              "type":"HOME or WORK",
              "zip":"CONTACT_ZIP"
            }],
            "birthday":"CONTACT_BIRTHDAY",
            "emails":[{
              "email":"CONTACT_EMAIL",
              "type":"WORK or HOME"
              }],
            "name":{
              "formatted_name":"CONTACT_FORMATTED_NAME",
              "first_name":"CONTACT_FIRST_NAME",
              "last_name":"CONTACT_LAST_NAME",
              "middle_name":"CONTACT_MIDDLE_NAME",
              "suffix":"CONTACT_SUFFIX",
              "prefix":"CONTACT_PREFIX"
              },
            "org":{
              "company":"CONTACT_ORG_COMPANY",
              "department":"CONTACT_ORG_DEPARTMENT",
              "title":"CONTACT_ORG_TITLE"
              },
            "phones":[{
              "phone":"CONTACT_PHONE",
              "wa_id":"CONTACT_WA_ID",
              "type":"HOME or WORK>"
              }],
            "urls":[{
              "url":"CONTACT_URL",
              "type":"HOME or WORK"
              }]
            }]
          }]
        },
      "field":"messages"
    }]
  }]
}


5.Received Callback from a Quick Reply Button:

{
  "object": "whatsapp_business_account",
  "entry": [{
      "id": "WHATSAPP_BUSINESS_ACCOUNT_ID",
      "changes": [{
          "value": {
              "messaging_product": "whatsapp",
              "metadata": {
                  "display_phone_number": PHONE_NUMBER,
                  "phone_number_id": PHONE_NUMBER_ID
              },
              "contacts": [{
                  "profile": {
                    "name": "NAME"
                  },
                  "wa_id": "WHATSAPP_ID"
                }],
              "messages": [{
                  "context": {
                    "from": PHONE_NUMBER,
                    "id": "wamid.ID"
                  },
                  "from": "16315551234",
                  "id": "wamid.ID",
                  "timestamp": TIMESTAMP,
                  "type": "button",
                  "button": {
                    "text": "No",
                    "payload": "No-Button-Payload"
                  }
                }]
          },
          "field": "messages"
        }]
    }]
}


6.Received Answer From List Message:

{
  "object": "whatsapp_business_account",
  "entry": [
    {
      "id": "WHATSAPP_BUSINESS_ACCOUNT_ID",
      "changes": [
        {
          "value": {
              "messaging_product": "whatsapp",
              "metadata": {
                   "display_phone_number": "PHONE_NUMBER",
                   "phone_number_id": "PHONE_NUMBER_ID",
              },
              "contacts": [
                {
                  "profile": {
                    "name": "NAME"
                  },
                  "wa_id": "PHONE_NUMBER_ID"
                }
              ],
              "messages": [
                {
                  "from": PHONE_NUMBER_ID,
                  "id": "wamid.ID",
                  "timestamp": TIMESTAMP,
                  "interactive": {
                    "list_reply": {
                      "id": "list_reply_id",
                      "title": "list_reply_title",
                      "description": "list_reply_description"
                    },
                    "type": "list_reply"
                  },
                  "type": "interactive"
                }
              ]
          },
          "field": "messages"
        }
      ]
    }
  ]
}


7.Received Answer to Reply Button:

{
  "object": "whatsapp_business_account",
  "entry": [
    {
      "id": "WHATSAPP_BUSINESS_ACCOUNT_ID",
      "changes": [
        {
          "value": {
              "messaging_product": "whatsapp",
              "metadata": {
                   "display_phone_number": "PHONE_NUMBER",
                   "phone_number_id": PHONE_NUMBER_ID,
              },
              "contacts": [
                {
                  "profile": {
                    "name": "NAME"
                  },
                  "wa_id": "PHONE_NUMBER_ID"
                }
              ],
              "messages": [
                {
                  "from": PHONE_NUMBER_ID,
                  "id": "wamid.ID",
                  "timestamp": TIMESTAMP,
                  "interactive": {
                    "button_reply": {
                      "id": "unique-button-identifier-here",
                      "title": "button-text",
                    },
                    "type": "button_reply"
                  },
                  "type": "interactive"
                }
              ]
          },
          "field": "messages"
        }
      ]
    }
  ]
}


8.Received Message Triggered by Click to WhatsApp Ads:

{
  "object": "whatsapp_business_account",
  "entry": [
    {
      "id": "ID",
      "changes": [
        {
          "value": {
            "messaging_product": "whatsapp",
            "metadata": {
              "display_phone_number": "PHONE_NUMBER",
              "phone_number_id": "PHONE_NUMBER_ID"
            },
            "contacts": [
              {
                "profile": {
                  "name": "NAME"
                },
                "wa_id": "ID"
              }
            ],
            "messages": [
              {
                "referral": {
                  "source_url": "AD_OR_POST_FB_URL",
                  "source_id": "ADID",
                  "source_type": "ad or post",
                  "headline": "AD_TITLE",
                  "body": "AD_DESCRIPTION",
                  "media_type": "image or video",
                  "image_url": "RAW_IMAGE_URL",
                  "video_url": "RAW_VIDEO_URL",
                  "thumbnail_url": "RAW_THUMBNAIL_URL",
                },
                "from": "SENDER_PHONE_NUMBERID",
                "id": "wamid.ID",
                "timestamp": "TIMESTAMP",
                "type": "text",
                "text": {
                  "body": "BODY"
                }
              }
            ]
          },
          "field": "messages"
        }
      ]
    }
  ]
}


9.Product Inquiry Messages:

{
  "object": "whatsapp_business_account",
  "entry": [
    {
      "id": "ID",
      "changes": [
        {
          "value": {
              "messaging_product": "whatsapp",
              "metadata": {
                   "display_phone_number": "PHONE_NUMBER",
                   "phone_number_id": "PHONE_NUMBER_ID",
              },
              "contacts": [
                {
                  "profile": {
                    "name": "NAME"
                  },
                  "wa_id": "PHONE_NUMBER_ID"
                }
              ],
              "messages": [
                {
                  "from": "PHONE_NUMBER",
                  "id": "wamid.ID",
                  "text": {
                    "body": "MESSAGE_TEXT"
                  },
                  "context": {
                    "from": "PHONE_NUMBER",
                    "id": "wamid.ID",
                    "referred_product": {
                      "catalog_id": "CATALOG_ID",
                      "product_retailer_id": "PRODUCT_ID"
                    }
                  },
                  "timestamp": "TIMESTAMP",
                  "type": "text"
                }
              ]
          },
          "field": "messages"
        }
      ]
    }
  ]
}


10.Order Messages:

{
  "object": "whatsapp_business_account",
  "entry": [
    {
      "id": "8856996819413533",
      "changes": [
        {
          "value": {
              "messaging_product": "whatsapp",
              "metadata": {
                   "display_phone_number": "16505553333",
                   "phone_number_id": "phone-number-id",
              },
              "contacts": [
                {
                  "profile": {
                    "name": "Kerry Fisher"
                  },
                  "wa_id": "16315551234"
                }
              ],
              "messages": [
                {
                  "from": "16315551234",
                  "id": "wamid.ABGGFlCGg0cvAgo6cHbBhfK5760V",
                  "order": {
                    "catalog_id": "the-catalog_id",
                    "product_items": [
                      {
                        "product_retailer_id":"the-product-SKU-identifier",
                        "quantity":"number-of-item",
                        "item_price":"unitary-price-of-item",
                        "currency":"price-currency"
                      },
                      ...
                    ],
                    "text":"text-message-sent-along-with-the-order"
                  },
                  "context": {
                    "from": "16315551234",
                    "id": "wamid.gBGGFlaCGg0xcvAdgmZ9plHrf2Mh-o"
                  },
                  "timestamp": "1603069091",
                  "type": "order"
                }
              ]
          },
          "field": "messages"
        }
      ]
    }
  ]
}


11.User Changed Number Notification:

{
  "object": "whatsapp_business_account",
  "entry": [{
      "id": "WHATSAPP_BUSINESS_ACCOUNT_ID",
      "changes": [{
          "value": {
              "messaging_product": "whatsapp",
              "metadata": {
                  "display_phone_number": PHONE_NUMBER,
                  "phone_number_id": PHONE_NUMBER_ID
              },
              "messages": [{
                  "from": PHONE_NUMBER,
                  "id": "wamid.ID",
                  "system": {
                    "body": "NAME changed from PHONE_NUMBER to PHONE_NUMBER",
                    "new_wa_id": NEW_PHONE_NUMBER,
                    "type": "user_changed_number"
                  },
                  "timestamp": TIMESTAMP,
                  "type": "system"
                }]
          },
          "field": "messages"
        }]
    }]
}


12.Status: Message Sent:

The following notification is received when a business sends a message as part of a user-initiated conversation (if that conversation did not originate in a free entry point):
{
  "object": "whatsapp_business_account",
  "entry": [{
    "id": "WHATSAPP_BUSINESS_ACCOUNT_ID",
    "changes": [{
    "value": {
    "messaging_product": "whatsapp",
    "metadata": {
      "display_phone_number": "PHONE_NUMBER",
      "phone_number_id": "PHONE_NUMBER_ID"
      },
    "statuses": [{
      "id": "wamid.ID",
      "recipient_id": "PHONE_NUMBER",
      "status": "sent",
      "timestamp": "TIMESTAMP",
      "conversation": {
        "id": "CONVERSATION_ID",
        "expiration_timestamp": TIMESTAMP,
        "origin": {
          "type": "user_initiated"
          }
        },
      "pricing": {
        "pricing_model": "CBP",
        "billable": true,
        "category": "user_initiated"
        }
      }]
    },
    "field": "messages"
  }]
 }]
}

The following notification is received when a business sends a message as part of a business-initiated conversation:

{
  "object": "whatsapp_business_account",
  "entry": [{
    "id": "WHATSAPP_BUSINESS_ACCOUNT_ID",
    "changes": [{
    "value": {
    "messaging_product": "whatsapp",
    "metadata": {
      "display_phone_number": "PHONE_NUMBER",
      "phone_number_id": "PHONE_NUMBER_ID"
      },
    "statuses": [{
      "id": "wamid.ID",
      "recipient_id": "PHONE_NUMBER",
      "status": "sent",
      "timestamp": "TIMESTAMP",
      "conversation": {
        "id": "CONVERSATION_ID",
        "expiration_timestamp": TIMESTAMP,
        "origin": {
          "type": "business_initated"
          }
        },
      "pricing": {
        "pricing_model": "CBP",
        "billable": true,
        "category": "business_initated"
        }
      }] 
    },
    "field": "messages"
    }]
 }]
}


The following notification is received when a business sends a message in reply to a user-initiated conversation originating from free entry points:

{
  "object": "whatsapp_business_account",
  "entry": [{
    "id": "WHATSAPP_BUSINESS_ACCOUNT_ID",
    "changes": [{
    "value": {
    "messaging_product": "whatsapp",
    "metadata": {
      "display_phone_number": "PHONE_NUMBER",
      "phone_number_id": "PHONE_NUMBER_ID"
      },
    "statuses": [{
      "id": "wamid.ID",
      "status": "sent",
      "timestamp": TIMESTAMP,
      "recipient_id": PHONE_NUMBER,
      "conversation": {
        "id": "CONVERSATION_ID",
        "expiration_timestamp": TIMESTAMP,
        "origin": {
          "type": "referral_conversion"
          }
      },
      "pricing": {
        "billable": false,
        "pricing_model": "CBP",
        "category": "referral_conversion"
        }
     }]
    },
    "field": "messages"
   }]
 }]
}


13. Status: Message Delivered:

The following notification is received when a business’ message is delivered and that message is part of a user-initiated conversation (if that conversation did not originate in a free entry point):

{
  "object": "whatsapp_business_account",
  "entry": [{
    "id": "WHATSAPP_BUSINESS_ACCOUNT_ID",
    "changes": [{
    "value": {
    "messaging_product": "whatsapp",
    "metadata": {
      "display_phone_number": "PHONE_NUMBER",
      "phone_number_id": "PHONE_NUMBER_ID"
      },
    "statuses": [{
      "id": "wamid.ID",
      "recipient_id": "PHONE_NUMBER",
      "status": "delivered",
      "timestamp": "TIMESTAMP",
      "conversation": {
        "id": "CONVERSATION_ID",
        "expiration_timestamp": TIMESTAMP,
        "origin": {
          "type": "user_initiated"
         }
        },
      "pricing": {
        "pricing_model": "CBP",
        "billable": true,
        "category": "user_initiated"
        }
      }]
     },
    "field": "messages"
  }]
 }]
}


The following notification is received when a business’ message is delivered and that message is part of a business-initiated conversation:

{
  "object": "whatsapp_business_account",
  "entry": [{
    "id": "WHATSAPP_BUSINESS_ACCOUNT_ID",
    "changes": [{
    "value": {
    "messaging_product": "whatsapp",
    "metadata": {
      "display_phone_number": "PHONE_NUMBER",
      "phone_number_id": "PHONE_NUMBER_ID"
      },
    "statuses": [{
      "id": "wamid.ID",
      "recipient_id": "PHONE_NUMBER",
      "status": "delivered",
      "timestamp": "TIMESTAMP",
      "conversation": {
        "id": "CONVERSATION_ID",
        "expiration_timestamp": TIMESTAMP,
        "origin": {
          "type": "business_initiated"
        }
      },
      "pricing": {
        "pricing_model": "CBP",
        "billable": true,
        "category":"business-initiated"
      }
    }]
    },
    "field": "messages"
  }]
 }]
}


The following notification is received when a business’ message is delivered and that message is part of a user-initiated conversation originating from a free entry point:

{
  "object": "whatsapp_business_account",
  "entry": [{
    "id": "WHATSAPP_BUSINESS_ACCOUNT_ID",
    "changes": [{
    "value": {
    "messaging_product": "whatsapp",
    "metadata": {
      "display_phone_number": "PHONE_NUMBER",
      "phone_number_id": "PHONE_NUMBER_ID"
      },
    "statuses": [{
      "id": "wamid.ID",
      "status": "sent",
      "timestamp": "TIMESTAMP",
      "recipient_id": "PHONE_NUMBER",
      "conversation": {
        "id": "CONVERSATION_ID",
        "expiration_timestamp": TIMESTAMP,
        "origin" {
          "type": "referral_conversion"
          }
        },
      "pricing": {
        "billable": false,
        "pricing_model": "CBP",
        "category": "referral_conversion"
      }
    }]
    },
    "field": "messages"
  }]
 }]
}


14.Status: Message Deleted:

{
  "object": "whatsapp_business_account",
  "entry": [{
    "id": "WHATSAPP_BUSINESS_ACCOUNT_ID",
    "changes": [{
      "value": {
      "messaging_product": "whatsapp",
      "metadata": {
        "display_phone_number": PHONE_NUMBER,
        "phone_number_id": PHONE_NUMBER
      },
      "contacts": [{
        "profile": {
          "name": "NAME"
          },
        "wa_id": PHONE_NUMBER
        }],
    "messages": [{
      "from": PHONE_NUMBER,
      "id": "wamid.ID",
      "timestamp": TIMESTAMP,
      "errors": [{
        "code": 131051,
        "details": "Message type is not currently supported",
        "title": "Unsupported message type"
        }],
      "type": "unsupported"
      }]
    },
    "field": "messages"
    }]
  }]
}


15.Status: Message Failed:

{
  "object": "whatsapp_business_account",
  "entry": [{
    "id": "WHATSAPP_BUSINESS_ACCOUNT_ID",
    "changes": [{
      "value": {
        "messaging_product": "whatsapp",
        "metadata": {
          "display_phone_number": PHONE_NUMBER,
          "phone_number_id": PHONE_NUMBER_ID
           },
        "statuses": [{
          "id": "wamid.ID",
          "status": "failed",
          "timestamp": TIMESTAMP,
          "recipient_id": PHONE_NUMBER,
          "errors": [{
            "code": 131014,
            "title": "Request for url https://URL.jpg failed with error: 404 (Not Found)"
            }]
          }]
      },
      "field": "messages"
    }]
  }]
}


GET : Send Business Initiated Template Message
  • Get Parameters
  • HTTP API Call
  • Sample API Code
  • Sample Response
  • API Error codes
Note : If you intend to use buttons, this API cannot be utilized. Instead, please use the POST method, which is listed at the top of the page.

Request:

http://wa.smsidea.com/api/v1/GetSendTemplateMessage


Parameters:

Field Description For Example Required
key Your Instance API Key AbCdEfGhIjKlMnOpQrStUvWxYz123456
to Your sender number 919427094270
TemplateName Template Name hello_world
headertype header type text / image / video / documents
[ Note :- 1. Image extension .jpeg, .PNG and size 5mb allowed
2. Video extension .mp4, .3gpp and size 16mb allowed
3. Documents extension .pdf and size 100mb allowed ]
languageCode Language Code en_US
BodyParameter Body Parameter
[ Note :- 1. Multiple Body Parameter added with use semicolon (;) ]
Depend on template required or not
link All type of media link with extension & passing Base64 formatting https://whatsapp.xyz.com/img/white.png
filename File Name sample file
IsFailOverMessage Isto be passed in case SMS needs to be sent for WhatsApp delivery failure true/false
SenderId to be passed for SMS to be sent instead of WhatsApp STTTST
ContentTemplate this is the SMS content that will be sent Hello, This is text message.
SendingMessageType Pass "5" for WABA and "6" for SMS and WABA both, 5
A sample HTTP API Call would be:
http://wa.smsidea.com/api/v1/GetSendTemplateMessage?key=your_API_key&to=sender_number&TemplateName=hello_world&headertype=Text&
languageCode=en_US&BodyParameter=one&IsFailOverMessage=true

For Example:

http://wa.smsidea.com/api/v1/GetSendTemplateMessage?key=your_API_key&to=sender_number&TemplateName=hello_world&headertype=Text&
languageCode=en_US&BodyParameter=one&IsFailOverMessage=true

  • C#
  • PHP
  • JAVA

Calling HTTP API Using C#.Net

using System;
using RestSharp;

  public void GetWABATemplates()
   {
       string key = "AbCdEfGhIjKlMnOpQrStUvWxYz123456";
       string messaging_product = "whatsapp";
       string to = "919427094270";
       string TemplateName = "sample_shipping_confirmation";
       string headertype = "Text";
       string languageCode = "en_US";
       string BodyParameter = "one";
       string IsFailOverMessage = "false";

       var client = new RestClient("http://wa.smsidea.com/api/v1/GetSendTemplateMessage?key=" + key + "&to=" + to + "&TemplateName=" + TemplateName + "&headertype=" + headertype + "&languageCode=" + languageCode + "&BodyParameter=" + BodyParameter + "&IsFailOverMessage=" + IsFailOverMessage);
       client.Timeout = -1;
       var request = new RestRequest(Method.GET);
       IRestResponse response = client.Execute(request);
       Console.WriteLine(response .Content);
   }

Calling HTTP API Using VB.Net

Imports System.Net
Imports System.Text

Module Program 
   Sub Main (args As String())        
    Dim jsonstring As String = 
     "{
         ""key""  :  ""AbCdEfGhIjKlMnOpQrStUvWxYz123456"",
         ""to"" : ""919999XXXXXX"",       
         ""type"" : ""text"",
         ""text"" :{
                    "preview_url":"false",
                    "body":"hello everyone"
                   },
       }"
    Dim RestURL As String = "http://wa.smsidea.com/api/v1/sendButtonMessage"
    Dim client As New Http.HttpClient
    Dim RestContent As New Http.StringContent(jsonstring,Encoding.UTF8,"application/json")
    Dim RestResponse As Http.HttpResponseMessage = client.PostAsync(RestURL, RestContent).GetAwaiter().GetResult()
   End Sub
End Module

Calling HTTP API Using php

<?php
$curl = curl_init();

curl_setopt_array($curl,array(
     CURLOPT_URL => 'http://wa.smsidea.com/api/v1/GetSendTemplateMessage?key=your_API_key&to=sender_number&TemplateName=hello_world&headertype=Text&languageCode=en_US&BodyParameter=one&IsFailOverMessage=true',
     CURLOPT_RETURNTRANSFER => true,
     CURLOPT_ENCODING => '',
     CURLOPT_MAXREDIRS => 10,
     CURLOPT_TIMEOUT => 0,
     CURLOPT_FOLLOWLOCATION => true,
     CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
     CURLOPT_CUSTOMREQUEST => 'GET',
));

$response = curl_exec($curl);
curl_close($curl);
echo $response;

?>

Calling HTTP API Using Java

import java.io.IOException;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;

public void GetWABATemplates() {
    try {
          OkHttpClient client = new OkHttpClient().newBuilder().build();
          Request request = new Request.Builder()
            .url("http://wa.smsidea.com/api/v1/GetSendTemplateMessage?key=your_API_key&to=sender_number&TemplateName=hello_world&headertype=Text&languageCode=en_US&BodyParameter=one&IsFailOverMessage=true")    
            .method("GET", null)
            .build();
          Response response = client.newCall(request).execute();
        }
    catch (Exception ex) {
        ex.printStackTrace();
      }
    }


Calling HTTP API Using VB 6

public Sub Form_Load(strUrl As String)

    Dim strUrl as string = "http://wa.smsidea.com/api/v1/GetWABATemplates"
    Dim jsonText as string 
    jsonText =  "{
         ""key""  :  ""AbCdEfGhIjKlMnOpQrStUvWxYz123456"",
         ""to"" : ""919999XXXXXX"",       
         ""type"" : ""text"",
         ""text"" :{
                    "preview_url":"false",
                    "body":"hello everyone"
                   },
       }",
    Dim objHttp as Object
    Dim strText as string
    Set objHttp = CreateObject("MSXML2.ServerXMLHTTP")
    objHttp.Open "GET", strUrl, jsonText, False
    objHttp.setRequestHeader "Content-Type","application/json"
    "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
    objHttp.Send
    strText = objHttp.responseText
    Set objHttp = Nothing

End Sub
Sample Response:

{
    "ErrorCode": "000",
    "ErrorMessage": "success",
     "Data": [
        {
            "Key": "99e7883d76284a53bfdkgjiwe286",
            "InstanceNumber": "919228111123",
            "mobileNumber": "919427094270",
            "MaskId": "[\"2b933f01fdj0648fkd0d141ddbe08\"]"
        }
    ]
} 
                                                
API Error codes : (If Error code is not present in given list then please Click here)

  • "ErrorCode": "0","ErrorMessage": "AuthException"
  • "ErrorCode": "1","ErrorMessage": "API Unknown"
  • "ErrorCode": "2","ErrorMessage": "API Service"
  • "ErrorCode": "3","ErrorMessage": "API Method"
  • "ErrorCode": "4","ErrorMessage": "API Too Many Calls"
  • "ErrorCode": "10","ErrorMessage": "API Permission Denied"
  • "ErrorCode": "100","ErrorMessage": "Parameter is invalid"
  • "ErrorCode": "190","ErrorMessage": "Access token has expired"
  • "ErrorCode": "200-299","ErrorMessage": "API Permission (Multiple values depending on permission)"
  • "ErrorCode": "200 (subcode=2494049) ","ErrorMessage": "Phone number is not allowed"
  • "ErrorCode": "368","ErrorMessage": "Temporarily blocked for policies violations"
  • "ErrorCode": "506","ErrorMessage": "Duplicate Post"
  • "ErrorCode": "80007","ErrorMessage": "Rate limit issues"
  • "ErrorCode": "131052","ErrorMessage": "Media download error"
  • "ErrorCode": "131042","ErrorMessage": "Business eligibility — Payment issue"
  • "ErrorCode": "131043","ErrorMessage": "Message expired"
  • "ErrorCode": "130429","ErrorMessage": "Rate limit hit"
  • "ErrorCode": "131045","ErrorMessage": "Unsigned certificate"
  • "ErrorCode": "131016","ErrorMessage": "Service Overloaded"
  • "ErrorCode": "131047","ErrorMessage": "Re-engagement message"
  • "ErrorCode": "131048","ErrorMessage": "Spam Rate limit hit"
  • "ErrorCode": "131000","ErrorMessage": "Generic Error"
  • "ErrorCode": "131001","ErrorMessage": "Message too long"
  • "ErrorCode": "131002","ErrorMessage": "Invalid recipient type"
  • "ErrorCode": "131005","ErrorMessage": "Access denied"
  • "ErrorCode": "131006","ErrorMessage": "Resource not found"
  • "ErrorCode": "131008","ErrorMessage": "Required parameter is missing"
  • "ErrorCode": "131009","ErrorMessage": "Parameter value is not valid"
  • "ErrorCode": "131021","ErrorMessage": "Bad User"
  • "ErrorCode": "131031","ErrorMessage": "Account has been locked"
  • "ErrorCode": "131051","ErrorMessage": "Unsupported message type"
  • "ErrorCode": "131055","ErrorMessage": "Method not allowed"
  • "ErrorCode": "132000","ErrorMessage": "Template Param Count Mismatch"
  • "ErrorCode": "132001","ErrorMessage": "Template does not exist"
  • "ErrorCode": "132005","ErrorMessage": "Template Hydrated Text Too Long"
  • "ErrorCode": "132007","ErrorMessage": "Template Format Character Policy Violated"
  • "ErrorCode": "132012","ErrorMessage": "Template Parameter Format Mismatch"
  • "ErrorCode": "133000","ErrorMessage": "Incomplete Delete"
  • "ErrorCode": "133001","ErrorMessage": "Decryption Error"
  • "ErrorCode": "133002","ErrorMessage": "Backup Blob Decryption Error"
  • "ErrorCode": "133003","ErrorMessage": "Recovery Token Decryption Error"
  • "ErrorCode": "133004","ErrorMessage": "Server Temporarily Unavailable"
  • "ErrorCode": "133005","ErrorMessage": "Security PIN Mismatch"
  • "ErrorCode": "133006","ErrorMessage": "Recovery Token Incorrect"
  • "ErrorCode": "133007","ErrorMessage": "Account Blocked"
  • "ErrorCode": "133008","ErrorMessage": "Too Many PIN Guesses"
  • "ErrorCode": "133009","ErrorMessage": "PIN Guessed Too Fast"

  • "ErrorCode": "501","ErrorMessage": "your url is not valid"
  • "ErrorCode": "502","ErrorMessage": "your file is Over Sized"
  • "ErrorCode": "503","ErrorMessage": "file not found"
  • "ErrorCode": "504","ErrorMessage": "your passing parameters are missing or invalid."
  • "ErrorCode": "505","ErrorMessage": "your passing file is invalid."
GET : Get Message Report
  • Get Parameters
  • HTTP API Call
  • Sample API Code
  • Sample Response
  • API Error codes

Request:

http://wa.smsidea.com/api/v1/GetSentMessageReport


Parameters:

Field Description For Example Required
APIKey Your Instance API key AbCdEfGhIjKlMnOpQrStUvWxYz123456
maskid Your Message maskid AbCdEfGhIjKlMnOpQrStUvWxYz123456
A sample HTTP API Call would be:
http://wa.smsidea.com/api/v1/GetSentMessageReport?APIKey=your_api_key&maskid=your_maskid

For Example:

http://wa.smsidea.com/api/v1/GetSentMessageReport?APIKey=AbCdEfGhIjKlMnOpQrStUvWxYz123456&maskid=4d820c1b96ba40c9864198bb1737eaaa

  • C#
  • PHP
  • JAVA

Calling HTTP API Using C#.Net

using System;
using RestSharp;

  public void GetSentMessageReport()
   {
       string APIKey = "AbCdEfGhIjKlMnOpQrStUvWxYz123456";
       string maskid = "AbCdEfGhIjKlMnOpQrStUvWxYz123456";

       var client = new RestClient("http://wa.smsidea.com/api/v1/GetSentMessageReport?APIKey="+APIKey+"&maskid="+maskid);
       client.Timeout = -1;
       var request = new RestRequest(Method.GET);
       IRestResponse response = client.Execute(request);
       Console.WriteLine(response .Content);
   }

Calling HTTP API Using VB.Net

Imports System.Net

Module Program 
   Sub Main (args As String())
    Dim WebRequest As Net.WebRequest
    Dim WebResonse As Net.WebResponse
'Masterkey that is to be used for submission Dim key As String = "AbCdEfGhIjKlMnOpQrStUvWxYz123456" Dim WebResponseString As String = ""
Dim URL As String = "http://wa.smsidea.com/api/v1/GetConnectionStatus?key="+key WebRequest = Net.HttpWebRequest.Create(URL) 'Hit URL Link WebRequest.Timeout = 25000
Try WebResonse = WebRequest.GetResponse 'Get Response Dim reader As IO.StreamReader = New IO.StreamReader(WebResonse.GetResponseStream) 'Read Response and store in variable WebResponseString = reader.ReadToEnd() WebResonse.Close() Catch ex As Exception WebResponseString = "Request Timeout" 'If any exception occur. End Try End Sub End Module

Calling HTTP API Using php

<?php
$curl = curl_init();

curl_setopt_array($curl,array(
     CURLOPT_URL => 'http://wa.smsidea.com/api/v1/GetSentMessageReport?APIKey=your_API_key&maskid=your_maskid',
     CURLOPT_RETURNTRANSFER => true,
     CURLOPT_ENCODING => '',
     CURLOPT_MAXREDIRS => 10,
     CURLOPT_TIMEOUT => 0,
     CURLOPT_FOLLOWLOCATION => true,
     CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
     CURLOPT_CUSTOMREQUEST => 'GET',
));

$response = curl_exec($curl);
curl_close($curl);
echo $response;

?>

Calling HTTP API Using Java

import java.io.IOException;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;

public void GetSentMessageReport() {
    try {
          OkHttpClient client = new OkHttpClient().newBuilder().build();
          Request request = new Request.Builder()
            .url("http://wa.smsidea.com/api/v1/GetSentMessageReport?APIKey=your_API_key&maskid=your_maskid")    
            .method("GET", null)
            .build();
          Response response = client.newCall(request).execute();
        }
    catch (Exception ex) {
        ex.printStackTrace();
      }
    }


Calling HTTP API Using VB 6

public Sub Form_Load()

    Dim strUrl as string = "http://wa.smsidea.com/api/v1/GetConnectionStatus?key=your_API_key"
    Dim objHttp as Object, strText as string

    Set objHttp = CreateObject("MSXML2.ServerXMLHTTP")
    objHttp.Open "GET", strUrl, False
    objHttp.setRequestHeader "User-Agent", _
    "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
    objHttp.Send ("")
    strText = objHttp.responseText
    Set objHttp = Nothing

End Sub
Sample Response:

By this api you can GetSentMessageReport for send message status get.

{
"ErrorCode": "000",
"ErrorMessage": "success",
  "Data": {
       "MaskId": "4d820c1b96b8bb1737eaaa",
       "SentDate": "2022-07-25T15:13:00",
       "Status": "Delivered"
    }
}

API Error codes : (If Error code is not present in given list then please Click here)

  • "ErrorCode": "000","ErrorMessage": "success"
  • "ErrorCode": "001","ErrorMessage": "invalid username or password"
  • "ErrorCode": "003","ErrorMessage": "senderid not approved"
  • "ErrorCode": "004","ErrorMessage": "insufficient balance"
  • "ErrorCode": "005","ErrorMessage": "template mismatch"
  • "ErrorCode": "006","ErrorMessage": "invalid recepient number"
  • "ErrorCode": "007","ErrorMessage": "miscellaneous error"
  • "ErrorCode": "008","ErrorMessage": "missing required parameters"
  • "ErrorCode": "009","ErrorMessage": "invalid date format"
  • "ErrorCode": "010","ErrorMessage": "invalid senderid format"
  • "ErrorCode": "011","ErrorMessage": "invalid mobile number"
  • "ErrorCode": "012","ErrorMessage": "invalid email address"
  • "ErrorCode": "013","ErrorMessage": "invalid reseller"
  • "ErrorCode": "014","ErrorMessage": "this mobile number is already registered with us"
  • "ErrorCode": "015","ErrorMessage": "you have not sufficiant balance to create new account"
  • "ErrorCode": "016","ErrorMessage": "invalid user to transfer credit OR you do not have rights to transfer credit on this user"
  • "ErrorCode": "017","ErrorMessage": "invalid api key"
  • "ErrorCode": "018","ErrorMessage": "instance is not logged on"
  • "ErrorCode": "019","ErrorMessage": "Record not Found!"

  • "ErrorCode": "099","ErrorMessage": "unknown error"
  • "ErrorCode": "101","ErrorMessage": "invalid master key"
  • "ErrorCode": "102","ErrorMessage": "invalid API key"
  • "ErrorCode": "103","ErrorMessage": "instance status connected"
  • "ErrorCode": "104","ErrorMessage": "instance status parring"
  • "ErrorCode": "105","ErrorMessage": "instance status not connected"
  • "ErrorCode": "106","ErrorMessage": "instance not created successfully"
  • "ErrorCode": "107","ErrorMessage": "instance validity expired"
  • "ErrorCode": "108","ErrorMessage": "user validity expired"
  • "ErrorCode": "109","ErrorMessage": "you have no sufficiant instance balance"
  • "ErrorCode": "110","ErrorMessage": "you have no sufficiant message balance"
  • "ErrorCode": "111","ErrorMessage": "you can cross instance limit"
  • "ErrorCode": "112","ErrorMessage": "you must be set an instance Message limit below 10"

  • "ErrorCode": "501","ErrorMessage": "your url is not valid"
  • "ErrorCode": "502","ErrorMessage": "your file is Over Sized"
  • "ErrorCode": "503","ErrorMessage": "file not found"
  • "ErrorCode": "504","ErrorMessage": "your passing parameters are missing or invalid."
  • "ErrorCode": "505","ErrorMessage": "your passing file is invalid."
wa.smsidea.com
Copyright wa.smsidea.com. All rights reserved © 2025