Retrieving chat message history

Returns up to 100 messages from a chat, and only messages from the last 90 days. The request is synchronous: the history comes back in the API response, not through a webhook.

To retrieve chat history, send a POST request to:

https://app.whatsgate.org/api/v1/get-history

The request body must contain:

{
  "WhatsappID": "YOUR_WHATSAPP_ID",
  "recipient": {
    "id": "19999999999@c.us"
  }
}
  • WhatsappID - WhatsApp identifier in the system
  • recipient - points to a chat (or group) whose history should be retrieved. Recipient object description

Successful response object

{
  "result": "OK"
  "data": [
        {
            "id": "false_19999999999@c.us_17AC61BFA5A561B7EE42F98810EDFFC4",
            "ack": 0,
            "hasMedia": false,
            "mediaKey": "",
            "body": "Hello world!",
            "type": "chat",
            "timestamp": 1667296242,
            "from": "19999999999@c.us",
            "to": "19999999999@c.us",
            "isForwarded": false
        }
    ]
}