NAV
bash javascript php python

Info

Welcome to the generated API reference. Get Postman Collection

Messaging Service

APIs for using Messaging as a Service

Send Message

HSM Messages Example request:

curl -X POST \
    "https://api.tellephant.com/v1/send-message" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"apikey":"ABCDEFGHIJKLMNOPQRSTUVWXYZ","to":919999999999,"channels":["whatsapp"],"whatsapp":{"contentType":"template","template":{"templateId":"dummy_template_name","language":"en","components":[]}}}'
const url = new URL(
    "https://api.tellephant.com/v1/send-message"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "apikey": "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
    "to": 919999999999,
    "channels": [
        "whatsapp"
    ],
    "whatsapp": {
        "contentType": "template",
        "template": {
            "templateId": "dummy_template_name",
            "language": "en",
            "components": []
        }
    }
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.tellephant.com/v1/send-message',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'apikey' => 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
            'to' => 919999999999,
            'channels' => [
                'whatsapp',
            ],
            'whatsapp' => [
                'contentType' => 'template',
                'template' => [
                    'templateId' => 'dummy_template_name',
                    'language' => 'en',
                    'components' => [],
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.tellephant.com/v1/send-message'
payload = {
    "apikey": "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
    "to": 919999999999,
    "channels": [
        "whatsapp"
    ],
    "whatsapp": {
        "contentType": "template",
        "template": {
            "templateId": "dummy_template_name",
            "language": "en",
            "components": []
        }
    }
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()




Example Component HSM (TEXT):


   "components" : [
                 {
                     "type" : "body",
                     "parameters" : [
                         {
                             "type" : "text",
                             "text" : "Dummy Text 1"
                         },
                         {
                             "type" : "text",
                             "text" : "Dummy Text 2"
                         }

                    ]
                 }
             ]
1

Example Component HSM (IMAGE):


   "components": [
                {
                    "type": "header",
                    "parameters": [
                        {
                            "type": "media",
                            "media": {
                                "type": "image",
                                "url": "https://tellephant.s3.ap-south-1.amazonaws.com/dummy-media/sample.jpeg"
                            }
                        }
                    ]
                },
                {
                    "type": "body",
                    "parameters": [
                        {
                            "type": "text",
                            "text": "Dummy Text 1"
                        },
                        {
                            "type": "text",
                            "text": "Dummy Text 2"
                        }
                    ]
                }
            ]

Example Component HSM (DOCUMENT):


   "components": [
                {
                    "type": "header",
                    "parameters": [
                        {
                            "type": "media",
                            "media": {
                                "type": "document",
                                "url": "https://tellephant.s3.ap-south-1.amazonaws.com/dummy-media/sample.pdf",
                                "filename": "Sample PDF"
                            }
                        }
                    ]
                },
                {
                    "type": "body",
                    "parameters": [
                        {
                            "type": "text",
                            "text": "Dummy Text 1"
                        },
                        {
                            "type": "text",
                            "text": "Dummy Text 2"
                        }
                    ]
                }
            ]

Example Component HSM (VIDEO):


   "components": [
                {
                    "type": "header",
                    "parameters": [
                        {
                            "type": "media",
                            "media": {
                                "type": "video",
                                "url": "https://tellephant.s3.ap-south-1.amazonaws.com/dummy-media/sample.mp4",
                                "caption": "Sample Video"
                            }
                        }
                    ]
                }
            ]

Example Component HSM (Location):


"components": [
                {
                    "type": "header",
                    "parameters": [
                        {
                            "type": "location",
                            "location": {
                                "latitude": 51.5005765,
                                "longitude": 7.4954884
                            }
                        }
                    ]
                },
                {
                    "type": "body",
                    "parameters": [
                        {
                            "type": "text",
                            "text": "Your text here"
                        }
                    ]
                }
            ]

Example response (200):

{
    "success": true,
    "messageId": "CAGHDVFHVFUDUYRFGUFJYR"
}

Example response (401):

{
    "status": false,
    "error": "Invalid API Key Provided"
}

Example response (401):

{
    "status": false,
    "error": "Please subscribe to addon first"
}

Example response (403):

{
    "status": false,
    "error": "Balance Low! Please recharge!"
}

Session Messages Example request:

curl -X POST \
    "https://api.tellephant.com/v1/send-message" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"apikey":"ABCDEFGHIJKLMNOPQRSTUVWXYZ","to":919999999999,"channels":["whatsapp"],"whatsapp": {}}'
const url = new URL(
    "https://api.tellephant.com/v1/send-message"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "apikey": "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
    "to": 919999999999,
    "channels": [
        "whatsapp"
    ],
    "whatsapp": {}
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.tellephant.com/v1/send-message',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'apikey' => 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
            'to' => 919999999999,
            'channels' => [
                'whatsapp',
            ],
            'whatsapp' => [],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.tellephant.com/v1/send-message'
payload = {
    "apikey": "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
    "to": 919999999999,
    "channels": [
        "whatsapp"
    ],
    "whatsapp": {}
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example Component Session Message (TEXT):


"whatsapp" : {
        "contentType" : "text",
        "text" : "You message here"
    }

Example Component Session Message (IMAGE):


"whatsapp": {
        "contentType": "media",
        "media": {
            "type": "image",
            "url": "https://tellephant.s3.ap-south-1.amazonaws.com/dummy-media/sample.jpeg",
            "caption": "Some text description"
        }
    }

Example Component Session Message (DOCUMENT):


"whatsapp": {
        "contentType": "media",
        "media": {
            "type": "document",
            "url": "https://tellephant.s3.ap-south-1.amazonaws.com/dummy-media/sample.pdf",
            "filename" : "Sample PDF"
        }
    }

Example Component Session Message (STICKER):


"whatsapp": {
        "contentType": "media",
        "media": {
            "type": "sticker",
            "url": "https://tellephant.s3.ap-south-1.amazonaws.com/dummy-media/sample.webp"
        }
    }

Example Component Session Message (VIDEO):


"whatsapp": {
        "contentType": "media",
        "media": {
            "type": "video",
            "url": "https://tellephant.s3.ap-south-1.amazonaws.com/dummy-media/sample.mp4",
            "caption" : "Sample Video"
        }
    }

Example Component Session Message (AUDIO):


"whatsapp": {
        "contentType": "media",
        "media": {
            "type": "audio",
            "url": "https://tellephant.s3.ap-south-1.amazonaws.com/dummy-media/sample.mp3",
            "caption" : "Sample Audio"
        }
    }

Example Component Session Message (LOCATION):


"whatsapp": {
        "contentType": "location",
        "location": {
            "longitude": -73.9855,
            "latitude": 40.7580,
            "name" : "Times Square",
            "address" : "Manhattan, NY 10036, United States"
        }
    }

Example Component Session Message (CONTACT):


"whatsapp": {
        "contentType": "contacts",
        "contacts": [
            {
                "name": {
                    "formattedName": "XYZ ABC",
                    "firstName" : "XYZ"
                },
                "phones": [
                    {
                        "phone": "919999999999",
                        "type": "WORK"
                    }
                ]
            }
        ]
    }

HTTP Request

Send HSM messages via this path.

POST v1/send-message

Body Parameters

Parameter Type Status Description
apikey String required API KEY Provided.
to integer required Number to send the message
channels array required Channel(s) to be used.
whatsapp.contentType String required Content type used
whatsapp.template array required Template Details
whatsapp.template.templateId String required Template identifier string
whatsapp.template.language String required Language in the template
whatsapp.template.components array required Template Data

HSM (Text)

Parameter In Type Status Description
parameters body array required Parameters to be used in Component
type body String required Text component for Whatsapp HSM
text body String required The text to be sent

HSM (Image)

Parameter In Type Status Description
parameters header array required Parameters to be used in Component
type header String required Media component for Whatsapp HSM
type media String required Image header
url media String required The url of the location where the image is stored
type body String required Text component for Whatsapp HSM
text body String required The text to be sent

HSM (Document)

Parameter In Type Status Description
parameters header array required Parameters to be used in Component
type header String required Media component for Whatsapp HSM
type media String required Document header
url media String required The url of the location where the document is stored
filename media String required Document Name
type body String required Text component for Whatsapp HSM
text body String required The text to be sent

HSM (VIDEO)

Parameter In Type Status Description
parameters header array required Parameters to be used in Component
type header String required Media component for Whatsapp HSM
type media String required Video header
url media String required The url of the location where the video is stored
caption media String optional Additional caption for the video.

HSM (LOCATION)

Parameter In Type Status Description
parameters header array required Parameters to be used in Component
type header String required Location component for Whatsapp HSM
latitude location number(double) required Latitude component of location
longitude location number(double) required Longitude component of location
type body String required Text component for Whatsapp HSM
text body String required The text to be sent

Send session messages via this path.

POST v1/send-message

Body Parameters

Parameter Type Status Description
apikey String required API KEY Provided.
to integer required Number to send the otp
channels array required Channel(s) to be used.
whatsapp array required Session message type and other details.

Session Message (Text)

Parameter Type Status Description
contentType string required Text header for Whatsapp Session message
text String required The text to be sent

Session Message (IMAGE)

Parameter Type Status Description
contentType string required Media header for Whatsapp Session message
type String required Type of media used
url String required Location where the image is stored
caption String required Text description alongwith

Session Message (DOCUMENT)

Parameter Type Status Description
contentType string required Media header for Whatsapp Session message
type String required Type of media used
url String required Location where the document is stored
filename String Required Title for the document

Session Message (STICKER)

Parameter Type Status Description
contentType string required Media header for Whatsapp Session message
type String required Type of media used
url String required Location where the sticker is stored

Session Message (VIDEO)

Parameter Type Status Description
contentType string required Media header for Whatsapp Session message
type String required Type of media used
url String required Location where the video is stored
caption String optional Text description alongwith

Session Message (AUDIO)

Parameter Type Status Description
contentType string required Media header for Whatsapp Session message
type String required Type of media used
url String required Location where the audio file is stored
caption String optional Text description alongwith

Session Message (LOCATION)

Parameter Type Status Description
contentType string required Location header for Whatsapp Session message
longitude number(double) required Logitude component of location
latitude number(double) required Latitude component of location
name String required Name of the location
address String required Address of the location

Session Message (CONTACT)

Parameter Type Status Description
contentType string required Contact header for Whatsapp Session message
formattedName String required Full name of the entity
firstName String required First name of the entity
phone String required Contact phone number details
type String required Type of contact

OTP Service

APIs for using OTP as a Service

Generate OTP

[Request for an OTP.]

Example request:

curl -X POST \
    "https://api.tellephant.com/v1/send-otp" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"apikey":"ABCDEFGHIJKLMNOPQRSTUVWXYZ","to":919999999999,"organisation_name":"Aiyo Labs"}'
const url = new URL(
    "https://api.tellephant.com/v1/send-otp"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "apikey": "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
    "to": 919999999999,
    "organisation_name": "Aiyo Labs"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.tellephant.com/v1/send-otp',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'apikey' => 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
            'to' => 919999999999,
            'organisation_name' => 'Aiyo Labs',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.tellephant.com/v1/send-otp'
payload = {
    "apikey": "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
    "to": 919999999999,
    "organisation_name": "Aiyo Labs"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (201):

{
    "success": true,
    "otpId": "CAGHDVFHVFUDUYRFGUFJYR"
}

Example response (422):

{
    "status": false,
    "error": {
        "apikey": [
            "The apikey field is required."
        ],
        "to": [
            "The to field is required."
        ],
        "organisation_name": [
            "The organisation_name field is required."
        ]
    }
}

Example response (401):

{
    "status": false,
    "error": "Invalid API Key Provided"
}

Example response (401):

{
    "status": false,
    "error": "Please subscribe to addon first"
}

Example response (403):

{
    "status": false,
    "error": "Balance Low! Please recharge!"
}

HTTP Request

POST v1/send-otp

Body Parameters

Parameter Type Status Description
apikey String required API KEY Provided.
to integer required to send OTP to.
organisation_name String required Name of the organisation.

Validate the OTP

[Verify the OTP if it's correct]

Example request:

curl -X POST \
    "https://api.tellephant.com/v1/validate-otp" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"apikey":"pi","otpId":"CAGHDVFHVFUDUYRFGUFJYR","otp":123456}'
const url = new URL(
    "https://api.tellephant.com/v1/validate-otp"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "apikey": "pi",
    "otpId": "CAGHDVFHVFUDUYRFGUFJYR",
    "otp": 123456
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://api.tellephant.com/v1/validate-otp',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'apikey' => 'pi',
            'otpId' => 'CAGHDVFHVFUDUYRFGUFJYR',
            'otp' => 123456,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://api.tellephant.com/v1/validate-otp'
payload = {
    "apikey": "pi",
    "otpId": "CAGHDVFHVFUDUYRFGUFJYR",
    "otp": 123456
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (200):

{
    "success": true,
    "message": "OTP is valid"
}

Example response (200):

{
    "success": false,
    "message": "OTP is either expired or already used."
}

Example response (200):

{
    "success": false,
    "message": "Invalid OtpId Provided."
}

Example response (200):

{
    "success": false,
    "message": "OTP does not match."
}

Example response (422):

{
    "status": false,
    "error": {
        "apikey": [
            "The apikey field is required."
        ],
        "otpId": [
            "The otpId field is required."
        ],
        "otp": [
            "The otp field is required."
        ]
    }
}

Example response (401):

{
    "status": false,
    "error": "Invalid API Key Provided"
}

HTTP Request

POST v1/validate-otp

Body Parameters

Parameter Type Status Description
apikey String required API KEY Provided.
otpId String required OTP ID Received.
otp integer required OTP to verify.

Webhook Management

APIs for managing account level information

Get Webhooks

[Get the current webhooks]

Example request:

curl -X POST \
    "https://app.tellephant.com/api/v2/user/webhook" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"apikey":"CAGHDVFHVFUDUYRFGUFJYR"}'
const url = new URL(
    "https://app.tellephant.com/api/v2/user/webhook"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "apikey": "CAGHDVFHVFUDUYRFGUFJYR"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.tellephant.com/api/v2/user/webhook',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'apikey' => 'CAGHDVFHVFUDUYRFGUFJYR',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://app.tellephant.com/api/v2/user/webhook'
payload = {
    "apikey": "CAGHDVFHVFUDUYRFGUFJYR"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (200):

{
    "success": true,
    "webhooks": {
        "delivery_response": {
            "url": "https:\/\/requestbin.com\/r\/XXXXXXXX",
            "status": false
        },
        "incoming_message": {
            "url": "https:\/\/requestbin.com\/r\/XXXXXXXXX",
            "status": true
        }
    }
}

Example response (422):

{
    "status": false,
    "error": {
        "apikey": [
            "The apikey field is required."
        ]
    }
}

Example response (401):

{
    "status": false,
    "error": "Invalid API Key Provided"
}

HTTP Request

POST api/v2/user/webhook

Body Parameters

Parameter Type Status Description
apikey String required API KEY Provided.

Update Webhooks

[Update the current webhooks]

Example request:

curl -X POST \
    "https://app.tellephant.com/api/v2/user/webhook/update" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"apikey":"CAGHDVFHVFUDUYRFGUFJYR","webhook_type":"delivery_response","webhook_endpoint":"\"https:\/\/requestbin.com\/r\/xxxxxxxx\"","webhook_status":"true"}'
const url = new URL(
    "https://app.tellephant.com/api/v2/user/webhook/update"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "apikey": "CAGHDVFHVFUDUYRFGUFJYR",
    "webhook_type": "delivery_response",
    "webhook_endpoint": "\"https:\/\/requestbin.com\/r\/xxxxxxxx\"",
    "webhook_status": "true"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://app.tellephant.com/api/v2/user/webhook/update',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'apikey' => 'CAGHDVFHVFUDUYRFGUFJYR',
            'webhook_type' => 'delivery_response',
            'webhook_endpoint' => '"https://requestbin.com/r/xxxxxxxx"',
            'webhook_status' => 'true',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://app.tellephant.com/api/v2/user/webhook/update'
payload = {
    "apikey": "CAGHDVFHVFUDUYRFGUFJYR",
    "webhook_type": "delivery_response",
    "webhook_endpoint": "\"https:\/\/requestbin.com\/r\/xxxxxxxx\"",
    "webhook_status": "true"
}
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (200):

{
    "success": true,
    "message": "Webhook successfully updated."
}

Example response (422):

{
    "status": false,
    "error": {
        "apikey": [
            "The apikey field is required."
        ],
        "webhook_type": [
            "The webhook type field is required."
        ],
        "webhook_endpoint": [
            "The webhook endpoint field is required."
        ],
        "webhook_status": [
            "The webhook status field is required."
        ]
    }
}

Example response (401):

{
    "status": false,
    "error": "Invalid API Key Provided"
}

HTTP Request

POST api/v2/user/webhook/update

Body Parameters

Parameter Type Status Description
apikey String required API KEY Provided.
webhook_type String required Webhook Type Provided.
webhook_endpoint Url required Webhook Endpoint Provided.
webhook_status Boolean required Webhook Status Provided.

Message Delivery Response

Message Accepted Response

{ "messageId": "60003fae6203e5098b751213", "status": "accepted", "timestamp": "2021-01-14T12:57:20.032134Z" }

Message Delivery Response

{ "messageId": "60003fae6203e5098b751213", "status": "delivered", "timestamp": "2021-01-14T12:57:20.253171Z" }

Message Seen Response

{ "messageId": "60003fae6203e5098b751213", "status": "seen", "timestamp": "2021-01-14T12:57:45Z" }


Note: For every WhatsApp message sent, there are three hits made to your webhook url i.e. (accepted, delivered and seen).

Incoming Payload (Text)

{ "messageId": "600042f62905c2668e678deb", "from": "Sender_number_with_country_code", "sender_name": "Sender_name", "to": "Recipient_number_with_country_code", "timestamp": "2021-01-14T13:11:17Z", "content_type": "text", "text": "Message_body", "received_at": "2021-01-14T13:11:17Z" }

Note: for every WhatsApp text message sent by the user to your Official WhatsApp Business Account, the incoming response is as shown above.

Incoming Payload (Image)

{ "messageId": "6000442d78789049501796f9", "from": "Sender_number_with_country_code", "sender_name": "Sender_name", "to": "Recipient_number_with_country_code", "timestamp": "2021-01-14T13:16:28Z", "content_type": "image", "media_url": "file_url", "received_at": "2021-01-14T13:16:28Z" }

Note: for every WhatsApp image message sent by the user to your Official WhatsApp Business Account, the incoming response is as shown above.

Incoming Payload (Document)

{ "messageId": "600044a8536544020b0a1346", "from": "Sender_number_with_country_code", "sender_name": "Sender_name", "to": "Recipient_number_with_country_code", "timestamp": "2021-01-14T13:18:30Z", "content_type": "document", "media_url": "file_url", "filename": "file_name.pdf", "caption": "file_caption", "received_at": "2021-01-14T13:18:30Z" }

Note: for every WhatsApp pdf message sent by the user to your Official WhatsApp Business Account, the incoming response is as shown above.

Incoming Payload (Sticker)

{ "messageId": "600138de6e99f9269c24252d", "from": "Sender_number_with_country_code", "sender_name": "Sender_name", "to": "Recipient_number_with_country_code", "timestamp": "2021-01-15T06:40:28Z", "content_type": "sticker", "media_url": "file_url", "received_at": "2021-01-15T06:40:28Z" }

Note: for every WhatsApp sticker message sent by the user to your Official WhatsApp Business Account, the incoming response is as shown above.

Incoming Payload (Video)

{ "messageId": "60013953d0d9562caa25fee2", "from": "Sender_number_with_country_code", "sender_name": "Sender_name", "to": "Recipient_number_with_country_code", "timestamp": "2021-01-15T06:42:22Z", "content_type": "video", "media_url": "file_url", "received_at": "2021-01-15T06:42:22Z" }

Note: for every WhatsApp video message sent by the user to your Official WhatsApp Business Account, the incoming response is as shown above.

Incoming Payload (Audio)

{ "messageId": "600139a3650de2794016f889", "from": "Sender_number_with_country_code", "sender_name": "Sender_name", "to": "Recipient_number_with_country_code", "timestamp": "2021-01-15T06:43:46Z", "content_type": "voice", "media_url": "file_url", "received_at": "2021-01-15T06:43:46Z" }

Note: for every WhatsApp audio message sent by the user to your Official WhatsApp Business Account, the incoming response is as shown above.

Incoming Payload (Location)

{ "messageId": "600139f1d935a0795a64ef0c", "from": "Sender_number_with_country_code", "sender_name": "Sender_name", "to": "Recipient_number_with_country_code", "timestamp": "2021-01-15T06:45:04Z", "content_type": "location", "location": { "longitude": 77.0952894, "latitude": 28.6297149 }, "received_at": "2021-01-15T06:45:04Z" }

Note: for every WhatsApp location message sent by the user to your Official WhatsApp Business Account, the incoming response is as shown above.

Incoming Payload (Contact)

{ "messageId": "60013a52d0d9562caa25fee6", "from": "Sender_number_with_country_code", "sender_name": "Sender_name", "to": "Recipient_number_with_country_code", "timestamp": "2021-01-15T06:46:42Z", "content_type": "contacts", "contacts": [ { "addresses": [], "emails": [], "ims": [], "name": { "firstName": "First_name", "middleName": "Middle_name", "lastName": "Last_name", "formattedName": "Full_Name" }, "org": { "company": "Company_Name" }, "phones": [ { "phone": "Number_with_country_code", "type": "Mobile", "waId": "formated_number" } ], "urls": [] } ], "received_at": "2021-01-15T06:46:42Z" }

Note: for every WhatsApp contact message sent by the user to your Official WhatsApp Business Account, the incoming response is as shown above.