Analytics

Export messaging analytics data

Exports one record per outbound message accepted in the given date range as CSV or JSON and returns the file content inline.

POST
/v1/analytics/export

Exports one record per outbound message accepted in the given date range as CSV or JSON and returns the file content inline. CSV follows RFC 4180: fields containing a quote, comma, or line break are quoted with embedded quotes doubled, and records are separated by CRLF. At most 10,000 records are returned, newest first.

x-api-key<token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

startDate*AbsoluteInstantEncoded
Match^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,9}))?)?(Z|([+-])(\d{2}):(\d{2}))$
endDate*AbsoluteInstantEncoded
Match^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,9}))?)?(Z|([+-])(\d{2}):(\d{2}))$
format?|null
includeChannels?array<>|null

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/analytics/export" \  -H "Content-Type: application/json" \  -d '{    "startDate": "string",    "endDate": "string"  }'
{  "content": "string",  "mimeType": "string",  "filename": "string"}

Related