Get a Free WhatsApp Business Account – Includes Onboarding, API Access & Sandbox. Apply Now!

WhatsApp API Documentation

Sending WhatsApp using authkey.io APIs is a breeze and lightning fast. Simply pass the message body, mobile number & authkey.io in the API request to send WhatsApp Message instantly.

WhatsApp Templates:

You can also create templates in the authkey.io portal and use the template ID (wid) in the API request. Templates are necessary in case of dynamic content present in the message. For example, in order to send an OTP message, you can create a template as below:

Dear {#name#}, your otp is {#otp#} authkey.io automatically adds the dynamic values of the Template as API Parameters which can be used to change the content delivered to each recipient.

Example usage for above template, assuming WhatsApp Template id (wid) generated as 101 is as follows:

https://console.authkey.io/request? authkey=authkey.io&mobile=RecepientMobile&country_code=CountryCode&wid=101&name=Twinkle&otp=1234

Here, 'name' and 'otp' parameters are auto-added to the API and their values shall be replaced in the template body {...}

Authkey Balance:

To fetch your authkey balance just pass your {#authkey#} as parameter, You can find {#authkey#} into your My Account > Profile.

https://console.authkey.io/restapi/getbalance.php?authkey=authkey

GET API To Send Media Document/Image/Video Template with variable

API using GET Request [Multimedia]:

https://console.authkey.io/restapi/request.php? authkey=XXXXXX&mobile=XXXXXXXXXX&country_code=91&wid=templateid&template_type=media&headerFileName=BillDetails&HeaderData=https://abc.pdf

API using POST Request:

https://console.authkey.io/restapi/requestjson.php
Headers:
Authorization: Basic
<Your Authkey>
Content-Type: application/json
Body:

                  {
                    "country_code": "XX",
                    "mobile": "XXXXXXXXXX",
                    "wid": "xxxx",
                    "type": "text",
                    "bodyValues": {"var1":"xxxx","var2":"xxxx"},
                    "headerValues": {
                      "headerFileName": "xyz",
                      "headerData":  "https://abc.pdf"
                    }
                  }
                
Parameters:
<Your authkey>
= Your authkey portal authkey

country_code = xx

mobile = Mobile Number

wid = WhatsApp Template ID

type = text/media

bodyValues = pass the variables as "var1":"value"

headerFileName = Header Name

headerData = file full url