1. Home
  2. Docs
  3. WhatsApp
  4. Receiving WhatsApp Message

Receiving WhatsApp Message

Incoming WhatsApp messages will be delivered to a pre-configured callback URL using the HTTP POST method. You can set up or modify this URL by visiting the following link:

https://console.geniq.io/settings/webhooks

The following parameters will be sent to the configured URL in JSON format:

PARAMETERFORMATDESCRIPTION
messageIdstringA unique ID associated with this WhatsApp message
typestringMessage type. Possible type:
• Text
• Image
• Video
• Audio
• Document
• Location
• Sticker
• Contact
recipientintegerThe recipient of this WhatsApp message
originatorintegerThe sender for this message
originatorNamestringThe sender’s name. The sender name could be empty if the user sets the profile to private
bodystringMessage body
messageTimestampstringThe creation data and time of the message in RFC33339 format (Y-m-d\TH:i:sP)

Sample callback – Text

{
  "messageId": "a662179e-ba00-492f-a0b7-06b3fa002502",
  "type": "text",
  "originator": "6588880000",
  "originatorName": "Mark Gold",
  "recipient": "6598989898",
  "body": "Hi, this is a test message",
  "messageTimestamp": "2025-02-20T14:45:42+08:00"
}

Sample callback – Image

{
  "messageId": "45fd72c3-3495-4313-ba5d-be2d0acff3ca",
  "type": "image",
  "originator": "6588880000",
  "originatorName": "Mark Gold",
  "recipient": "6598989898",
  "url": "https://ott-content.sgp1.digitaloceanspaces.com/whatsapp_content/108183965267441/photos/2336212190082434.jpg",
  "messageTimestamp": "2025-02-20T14:57:43+08:00"
}

Sample callback – Video

{
  "messageId": "3e499243-8aff-4271-ad7f-de8ab3522599",
  "type": "video",
  "originator": "6588880000",
  "originatorName": "Mark Gold",
  "recipient": "6598989898",
  "url": "https://ott-content.sgp1.digitaloceanspaces.com/whatsapp_content/108183965267441/videos/1021172809897592.mp4",
  "messageTimestamp": "2025-02-20T14:45:42+08:00"
}

Sample callback – Audio

{
  "messageId": "da97ef7d-2384-465c-8d0e-c34e7ebf6915",
  "type": "audio",
  "originator": "6588880000",
  "originatorName": "Mark Gold",
  "recipient": "6598989898",
  "url": "https://ott-content.sgp1.digitaloceanspaces.com/whatsapp_content/108183965267441/audios/973863791366279.oga",
  "messageTimestamp": "2025-02-20T14:45:42+08:00"
}

Sample callback – Document

{
  "messageId": "2fb05461-6dc6-4596-85f7-9ba598c42e1e",
  "type": "document",
  "originator": "6588880000",
  "originatorName": "Mark Gold",
  "recipient": "6598989898",
  "url": "https://ott-content.sgp1.digitaloceanspaces.com/whatsapp_content/108183965267441/others/608294372130072.pdf",
  "caption": "UserGuide.pdf",
  "filename": "UserGuide.pdf",
  "messageTimestamp": "2025-02-20T15:02:56+08:00"
}

Sample callback – Location

{
  "messageId": "858c6733-0012-49a2-ad9b-975e2681b5cf",
  "type": "location",
  "originator": "6588880000",
  "originatorName": "Mark Gold",
  "recipient": "6598989898",
  "latitude": "1.5133144855499",
  "longitude": "103.88278198242",
  "caption": "Seri Alam",
  "messageTimestamp": "2025-02-20T15:04:59+08:00"
}

Sample callback – Sticker

{
  "messageId": "4967db97-428c-4f1b-950b-38eba1e175a2",
  "type": "image",
  "originator": "6588880000",
  "originatorName": "Mark Gold",
  "recipient": "6598989898",
  "url": "https://ott-content.sgp1.digitaloceanspaces.com/whatsapp_content/108183965267441/photos/3138030356336447.webp",
  "messageTimestamp": "2025-02-20T15:06:55+08:00"
}

Sample callback – Contact

{
  "messageId": "a04287cb-05ee-4c6e-95b4-cc8f403c4f70",
  "type": "text",
  "originator": "6588880000",
  "originatorName": "Mark Gold",
  "recipient": "6598989898",
  "body": "BEGIN:VCARD\nVERSION:3.0\nFN:Anson Car sales agent \nN:Car sales agent;Anson ;;;\nTEL;type=CELL:+65-xxxxxxx\nEND:VCARD\n",
  "messageTimestamp": "2025-02-20T15:08:36+08:00"
}

#Note: Your platform should respond with HTTP Status Code 200 (OK). Otherwise, the same message will be delivered again.