Skip to main content

Reports API

Overview​

The Reports API starts an asynchronous export job. Rather than paging through data yourself, request an export and it is emailed to the address you specify once it's ready.

Authentication​

All endpoints require API key authentication:

X-API-Key: your-api-key-here

Request an export​

POST /api/reports/export

Request body​

FieldTypeRequiredDescription
receiver_emailstring (email)YesWhere the completed export is sent.
report_typestringYesOne of campaigns, marketing_email_details, subscribers, form_submissions.
output_formatstringYesCurrently only csv.
filtersobjectYesExport-type-specific filter key/value pairs.

Example request​

curl -X POST \
https://apis.app.stack9.co/api/reports/export \
-H 'X-API-Key: your-api-key-here' \
-H 'Content-Type: application/json' \
-d '{
"receiver_email": "ops@example.com",
"report_type": "campaigns",
"output_format": "csv",
"filters": {
"start_date": "2026-01-01T00:00:00Z",
"end_date": "2026-03-31T23:59:59Z"
}
}'

Example response​

{ "messageId": "msg_9kL3mP5n" }
note

The exact shape of filters is export-type-specific and not fully enumerated in the public contract beyond being a free-form object. The response only confirms the export job was accepted (messageId) — there is no polling or status endpoint documented here; the finished export arrives by email to receiver_email.

  • Marketing Events API — query engagement data directly instead of exporting a CSV.
  • Forms API — the form_submissions report type exports data captured by the forms you build there.