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
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.
apiKeyheader
x-api-key<token>application/json- body
namespaceId?|nullafter*stringbefore*stringformat?|nullincludeChannels?array<>|nullSuccess
application/json- response
content*stringmimeType*stringfilename*stringimport { createClient } from "samva";
const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
const result = await samva.analytics.exportData({
"after": "example",
"before": "example"
});Example Response
{
"content": "string",
"mimeType": "string",
"filename": "string"
}