Text

User Sends You A Message

{
  "app": "docdeck",
  "timestamp": 1718007189549,
  "version": 2,
  "type": "message",
  "payload": {
    "id": "ABEGkZUTIXZ0Ago6jWqOZm-Sz0WD",
    "source": "91XXXXX4",
    "type": "text",
    "payload": {
      "text": "Hi"
    },
    "sender": {
      "phone": "91XXXXX4",
      "name": "SJ",
      "country_code": "91",
      "dial_code": "9XXXXX4"
    }
  }
}

Common Payload Object Description

KeyDescriptionSample
appThe name of the Gupshup app to which the customer has sent a message on WhatsAppdocdeck
timestampThe time in UNIX timestamp when Gupshup received the message sent by the customer1718007189549
versionCallback payload version2
typeThe type of inbound eventmessage

Message Payload Object Description

KeyDescriptionSample
idThe unique WhatsApp message identifier for the inbound messageABEGkZUTIXZ0Ago6jWqOZm-Sz0WD
sourceThe phone number of the customer who has sent the message on WhatsApp, number is in E.164 format91XXXXX4
typeThe type of message received from the end user.text
payloadThe payload object contains the inbound message content sent by the customerHi

Sender Object Description

KeyDescriptionSample
phoneThe phone number of the end user who has sent the message on WhatsApp, number is in E.164 format91XXXXX4
nameName of the end user who has sent the message on WhatsAppSJ
country_codeThe sender's country code91
dial_codeThe sender's dial code9XXXXX4

User Replies To Your Message

Users can respond to a specific message on WhatsApp. To understand the context of a message reply, we include the context object. The context object provides the Gupshup message-id(property: gsId) of the message the user has replied to and the WhatsApp message-id(property: id) of the original message.

{
  "app": "docdeck",
  "timestamp": 1718007189549,
  "version": 2,
  "type": "message",
  "payload": {
    "id": "ABEGkZUTIXZ0Ago6jWqOZm-Sz0WD",
    "source": "91XXXXX4",
    "type": "text",
    "payload": {
      "text": "Hi"
    },
    "sender": {
      "phone": "91XXXXX4",
      "name": "SJ",
      "country_code": "91",
      "dial_code": "9XXXXX4"
    },
    "context": {
      "id": "gBEGkYaYVSEEAgnPFrOLcjkFjL8",
      "gsId": "9b71295f-f7af-4c1f-b2b4-31b4a4867bad"
    }
  }
}

Common Payload Object Description

KeyDescriptionSample
appThe name of the Gupshup app to which the customer has sent a message on WhatsAppdocdeck
timestampThe time in UNIX timestamp when Gupshup received the message sent by the customer1718007189549
versionCallback payload version2
typeThe type of inbound eventmessage

Message Payload Object Description

KeyDescriptionSample
idThe unique WhatsApp message identifier for the inbound messageABEGkZUTIXZ0Ago6jWqOZm-Sz0WD
sourceThe phone number of the customer who has sent the message on WhatsApp, number is in E.164 format91XXXXX4
typeThe type of message received from the end user.text
payloadThe payload object contains the inbound message content sent by the customerHi

Sender Object Description

KeyDescriptionSample
phoneThe phone number of the end user who has sent the message on WhatsApp, number is in E.164 format91XXXXX4
nameName of the end user who has sent the message on WhatsAppSJ
country_codeThe sender's country code91
dial_codeThe sender's dial code9XXXXX4

Context Object Description

KeyDescriptionSample
idThe unique WhatsApp message identifier for the inbound messagegBEGkYaYVSEEAgnPFrOLcjkFjL8
gsIdThe unique Gupshup message identifier for the inbound message9b71295f-f7af-4c1f-b2b4-31b4a4867bad

User Clicks The Button On A Quick Reply Template Message

When your customer clicks on a quick reply button, a response goes to your Webhook URL.

To understand the context of a message reply, we include the context object. The context object provides the Gupshup message-id(property: gsId) of the message the user has replied to and the WhatsApp message-id(property: id) of the original message. In addition to this payload, the object provides the button text that the user clicked.

{
   "app": "docdeck",
  "timestamp": 1718007189549,
  "version": 2,
  "type": "message",
  "payload": {
    "id": "ABEGkZUTIXZ0Ago6jWqOZm-Sz0WD",
    "source": "91XXXXX4",
    "type": "text",
    "payload": {
      "text": "View Account Balance", 
      "type": "button"
    },
    "sender": {
      "phone": "91XXXXX4",
      "name": "SJ",
      "country_code": "91",
      "dial_code": "9XXXXX4"
    },
    "context": {
      "id": "gBEGkYaYVSEEAgnPFrOLcjkFjL8",
      "gsId": "9b71295f-f7af-4c1f-b2b4-31b4a4867bad"
    }
  }
}

Common Payload Object Description

KeyDescriptionSample
appThe name of the Gupshup app to which the customer has sent a message on WhatsAppdocdeck
timestampThe time in UNIX timestamp when Gupshup received the message sent by the customer1718007189549
versionCallback payload version2
typeThe type of inbound eventmessage

Message Payload Object Description

KeyDescriptionSample
idThe unique WhatsApp message identifier for the inbound messageABEGkZUTIXZ0Ago6jWqOZm-Sz0WD
sourceThe phone number of the customer who has sent the message on WhatsApp, number is in E.164 format91XXXXX4
typeThe type of message received from the end user.text
payloadThe payload object contains the inbound message content sent by the customerView Account Balance
typeButtonbutton

Sender Object Description

KeyDescriptionSample
phoneThe phone number of the end user who has sent the message on WhatsApp, number is in E.164 format91XXXXX4
nameName of the end user who has sent the message on WhatsAppSJ
country_codeThe sender's country code91
dial_codeThe sender's dial code9XXXXX4

Context Object Description

KeyDescriptionSample
idThe unique WhatsApp message identifier for the inbound messagegBEGkYaYVSEEAgnPFrOLcjkFjL8
gsIdThe unique Gupshup message identifier for the inbound message9b71295f-f7af-4c1f-b2b4-31b4a4867bad