Passa al contenuto principale

Esporta lo storico invii come CSV

POST 

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

Queues an asynchronous CSV export of sent messages that were originated through the API within the given date range. This endpoint is designed for bulk data extraction and reporting scenarios where paginating through the list history endpoint would be impractical. The export covers all channels (SMS, RCS, WhatsApp) in a single file, so you do not need to request separate exports per channel. Only messages sent via the API are included; messages sent through other interfaces (such as campaign tools or the web console) are excluded. The request body requires startDateTime and endDateTime as ISO-8601 OffsetDateTime strings (for example: 2025-01-01T00:00:00+01:00). You can optionally filter by sender or recipient. This endpoint returns HTTP 202 Accepted immediately, meaning the export job has been queued but not yet completed. The export runs asynchronously in the background and may take from a few seconds to several minutes depending on the volume of data in the requested date range. To check the status of your export and retrieve the download URL once it is ready, poll the GET /partner-gateway/v1/exports endpoint. That endpoint will indicate whether the export is still in progress, completed (with a download link), or failed. The generated CSV file includes columns for message ID, channel, destination, delivery status, send date, delivery date, and other relevant metadata. Common pitfalls: requesting very large date ranges (months of data) may result in long processing times. If you need only a subset of the data, consider narrowing the date range or using the paginated list endpoint (GET /partner-gateway/v1/messages/history) instead. Error responses: 400 is returned if the request body is malformed or required fields are missing. 500 indicates an unexpected server-side error; retry after a short delay.

Richiesta

Risposte

Lavoro di esportazione accodato