Skip to content
Wbiztool

Messaging API

Message History API

Get a list of the messages in your workspace for a date range, with the status of each one. Use it to reconcile what was sent, build reports or find failed messages to retry.

POSThttps://wbiztool.com/api/v1/report/

Body: JSON (needed for pages after the first) or form fields

The history covers every message in the workspace of your API key, whether it was sent through the API, the dashboard or a campaign. Results come 200 per page, oldest first. The same data is available on the Reports page.

Quick example#

curl -X POST https://wbiztool.com/api/v1/report/ \
  -H "Content-Type: application/json" \
  -d '{
    "client_id": 12345,
    "api_key": "YOUR_API_KEY",
    "start_date": "01-09-2026",
    "end_date": "08-09-2026",
    "page": 1
  }'

Replace 12345 and YOUR_API_KEY with your own values. See Authentication for where to find them.

Request parameters#

Authentication

client_idintegerrequired

Your API Client ID from Settings → API keys.

api_keystringrequired

Your API key from the same page.

Filters

start_datestringrequired

First day to include, in DD-MM-YYYY format, for example 01-09-2026.

end_datestringrequired

End of the range, in DD-MM-YYYY format. This day itself isn't included. See Date range.

whatsapp_clientintegeroptional

Only return messages sent from this WhatsApp number, using its ID from WhatsApp settings. Leave it out to get messages from all your numbers.

pageintegeroptional

Page number, starting at 1 (the default). Each page holds up to 200 messages. Send it as a JSON number. 0 or a negative number returns total with an empty history.

Date range#

Dates are read as midnight at the start of that day in India Standard Time (IST, UTC+5:30), and messages are matched by when they were created (queued or scheduled), not when they were sent. The range runs from start_date 00:00 up to end_date 00:00, so:

  • "start_date": "01-09-2026", "end_date": "08-09-2026" returns 1 to 7 September. 8 September isn't included.
  • To get a single day, set end_date to the next day: "start_date": "15-09-2026", "end_date": "16-09-2026".
  • If both dates are the same, you get no messages.

Pagination#

Each response contains total, the number of messages in the whole range, and up to 200 of them in history. Request page 2, 3 and so on until page × 200 is at least total.

Response#

A successful request returns HTTP 200:

{
  "message": "Success",
  "status": 0,
  "total": 3,
  "history": [
    { "id": 9817263, "msg_type": "Text", "contact": "919876543210", "message_status": "Sent" },
    { "id": 9817264, "msg_type": "File", "contact": "919812345670", "message_status": "Failed" },
    { "id": 9817265, "msg_type": "Image", "contact": "Sales Team Mumbai", "message_status": "Pending" }
  ]
}
FieldTypeDescription
messagestringSuccess when the request worked, otherwise the error.
statusintegerAlways 0. Don't use it to detect success.
totalintegerNumber of messages in the date range across all pages. Only present on success.
historyarrayUp to 200 messages on this page, oldest first. Empty when there's an error.
history[].idintegerMessage ID, the same as the msg_id returned when it was sent.
history[].msg_typestringText, Image or File.
history[].contactstringThe recipient's phone number with country code, or the group name for group messages.
history[].message_statusstringSee the table below.

Message status values#

message_statusMeaning
PendingQueued or scheduled, not sent yet (status 0).
SentSent from your WhatsApp number (status 1).
DeliveredReserved, not currently returned.
ReadReserved, not currently returned.
FailedCouldn't be sent, or sending was interrupted (status 2). Use Message status to see the error.
CancelledCancelled before it was sent (status 3).
ExpiredNot sent before its expire_after_seconds deadline (status 4).

Delivery and read ticks aren't recorded at the moment, so sent messages always show as Sent. Delivered and Read are reserved values; if they ever appear, treat them as Sent.

Errors#

Errors return HTTP 200 with status set to 0, unless noted:

{ "message": "Error", "status": 0, "history": [] }
MessageHow to fix it
Errorstart_date or end_date is missing or not in DD-MM-YYYY format, the JSON body isn't valid (often a trailing comma), or the request wasn't a POST.
Auth ErrorSend both client_id and api_key.
Invalid Client IdSend client_id as a number. Returned with HTTP 403, without history.
Auth Error: invalid api keyCheck the key exists, hasn't been deleted and belongs to this client_id. Returned with HTTP 400, without history.
Demo Account can not access apisUse a regular account.

Tips#

  • Pull history in small ranges: a day or a week at a time keeps the number of pages low.
  • Find failed messages: filter history for Failed, then call Message status with each id to see why it failed. Before you retry, check the error: Sending was interrupted and may have been delivered… means the recipient may already have the message.
  • Old messages are purged: messages that reached a final status and haven't changed for about 90 days may be purged and no longer appear here, as are messages still queued 90 days after they were created or scheduled, on a number that's disconnected or deleted.
  • Real-time tracking: to react as messages are sent, pass a webhook when you send the message instead of polling this endpoint.