Incoming WhatsApp messages

Find out in which format will the message sent from your customers be delivered to your end-point.

Incoming messages will be forwarded in real-time to the end-point client provided during the setup. This way, 2-way communication will be established and Enterprise is enabled to create certain logic for processing incoming messages. 

NOTE

The endpoint needs to be provided by the Client. The endpoint is the URL where your services can be accessed by Infobip cPaaS platform. Infobip will complete the setup of the provided URL as part of the setup procedure on your behalf.

The connection can be secured with additional authorization header between Infobip cPaas and Enterprise’s’ endpoint.

Text Incoming message  

{
    "results": [
        {
            "from": "385919998888",
            "to": "1234",
            "integrationType": "WHATSAPP",
            "receivedAt": "2018-09-10T11:57:19.782+0000",
            "messageId": "ABEGOFkWA5EBAgo6B82cNiWIAMKC",
            "pairedMessageId": null,
            "callbackData": null,
            "message": {
                "type": "TEXT",
                "text": "Message Text."
            },
            "price": {
                "pricePerMessage": 0.000000,
                "currency": "HRK"
            }
        }
    ],
    "messageCount": 1,
    "pendingMessageCount": 0
}	
  

Image Incoming Message  

{
    "results": [
        {
            "from": "385919998888",
            "to": "1234",
            "integrationType": "WHATSAPP",
            "receivedAt": "2018-09-10T11:27:17.980+0000",
            "messageId": "ABEGOFkWA5EBAgo6B82cNiWIAMKC",
            "pairedMessageId": null,
            "callbackData": null,
            "message": {
                "type": "IMAGE",
                "caption": "Image Caption",
                "url": "https://{base_url}/whatsapp/1/senders/447796344125/media/f1b96d31-9ab9-4513-808b-50ab37360fbe"
            },
            "price": {
                "pricePerMessage": 0.000000,
                "currency": "HRK"
            }
        }
    ],
    "messageCount": 1,
    "pendingMessageCount": 0
}	
  

Document Incoming message  

{
    "results": [
        {
            "from": "385919998888",
            "to": "1234",
            "integrationType": "WHATSAPP",
            "receivedAt": "2018-09-10T12:10:18.379+0000",
            "messageId": "ABEGOFkWA5EBAgo6B82cNiWIAMKC",
            "pairedMessageId": null,
            "callbackData": null,
            "message": {
                "type": "DOCUMENT",
                "caption": "Document caption",
                "url": "https://{base_url}/whatsapp/1/senders/447796344125/media/c256e11d-a7e9-4dbb-aa9c-2a6028ddf7e8"
            },
            "price": {
                "pricePerMessage": 0.000000,
                "currency": "HRK"
            }
        }
    ],
    "messageCount": 1,
    "pendingMessageCount": 0
}	
  

Location Incoming Message  

{
    "results": [
        {
            "from": "385919998888",
            "to": "1234",
            "integrationType": "WHATSAPP",
            "receivedAt": "2018-09-10T12:13:53.864+0000",
            "messageId": "ABEGOFkWA5EBAgo6B82cNiWIAMKC",
            "pairedMessageId": null,
            "callbackData": null,
            "message": {
                "type": "LOCATION",
                "longitude": 15.9459228515625,
                "latitude": 45.793365478515625
            },
            "price": {
                "pricePerMessage": 0.000000,
                "currency": "HRK"
            }
        }
    ],
    "messageCount": 1,
    "pendingMessageCount": 1
}