Passa al contenuto principale

Message History

Consulta ed esporta lo storico completo dei messaggi inviati.

📄️Elenca storico invii

Returns a paginated list of sent messages for the given channel and date range, allowing you to browse your complete sending history with flexible filtering. Use this endpoint when you need to review past sends, audit delivery performance over a time window, or build dashboards and reports on message delivery rates. The channel parameter is required and restricts results to a single messaging channel (SMS, RCS, or WHATSAPP). To retrieve history across multiple channels, make separate requests for each channel. The from and to parameters define the send-date range (inclusive on both ends) and are required. They must be valid ISO-8601 OffsetDateTime strings that include the timezone offset, for example: 2025-01-01T00:00:00+01:00 or 2025-06-15T23:59:59Z. Common formatting mistakes to avoid: omitting the timezone offset (2025-01-01T00:00:00 alone is not valid), using date-only strings without a time component, or using non-ISO separators. If from is after to, the result will be an empty list rather than an error. The optional status parameter lets you filter by a specific delivery status such as DELIVERED, SENT, ERROR, EXPIRED, or UNKNOWN. Omit this parameter to return messages in all statuses. Pagination is controlled by the page and limit parameters. Pages are 0-based (the first page is page=0). The default page size is 20 if limit is not specified. To iterate through all results, increment the page parameter until the response returns fewer items than the requested limit, which indicates you have reached the last page. The response is a JSON array of DeliveryStatoResponse objects, which may be empty if no messages match the given filters. For large date ranges with many messages, consider using the export endpoint (POST /partner-gateway/v1/messages/history/export) to generate a downloadable CSV file instead of paginating through thousands of results. Error responses: 500 indicates an unexpected server-side error; retry after a short delay.

📄️Esporta lo storico invii come CSV

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.