Skip to main content

Export send history as CSV

POST 

/api/partner-gateway/messages/history/export

Queues a CSV export of the messages sent through the API in a date range, with every channel in one file.

  • API sends only: the messages sent from campaigns or from the web console are not included.
  • Body: startDateTime and endDateTime as ISO-8601 date-times with an offset, such as 2025-01-01T00:00:00+01:00. sender and recipient are optional filters.
  • The answer is 202: the job is queued, not completed. It can take from a few seconds to several minutes, depending on the volume of the date range.
  • Get the file: poll GET /exports. The export is listed there once its file is ready; an export that is still running, or that failed, is not listed.
  • Large ranges are slow: months of data can take long. If you need a subset, narrow the range or page through GET /messages/history.

On RCS and WhatsApp the status columns do not follow deliveryStatus. They only say whether a delivery date was recorded: 3, Delivered, when one was, otherwise 1, Sent. A failed message reads Sent, and an RCS message that the status API reports as UNSUPPORTED or EXPIRED, or a WhatsApp one reported as UNKNOWN, can read Delivered.

Columns of the CSV file

In this order:

  1. Row number.
  2. DateTime: the send date.
  3. Originator: the SMS sender or the WhatsApp phone number, empty for RCS.
  4. Destination: with its last three characters replaced by ***, on every channel.
  5. Delivery status: the numeric code that Delivery result spells out.
  6. IP address.
  7. ID SubAccount: the API user that sent the message.
  8. SMS cost: the unit price, on every channel.
  9. Customer ID: the messageId given at send time, or the identifier generated when none was given.
  10. Sent type: SMS-API, RCS-API or WHATSAPP-API.
  11. Part number.
  12. Total parts.
  13. Delivery result: Sent, Rejected, Delivered, Expired, Deleted or Undeliverable.

An SMS too long for a single part has one row per part. The file has no delivery-date column and does not contain the message text.

Request​

Responses​

Export queued. No response body.