Data Exports
Export email logs, metrics, and analytics data from Motorical.
Quick Preview
Get a lightweight preview of recent logs without creating a background job:
curl -H "Authorization: Bearer $TOKEN" \
"$BASE_URL/motor-blocks/$BLOCK_ID/exports/preview?limit=100"
Parameters:
| Parameter | Description |
|---|---|
limit | Max records (default 100, max 500) |
includePII | true/false (requires logs.pii scope) |
Background Export Jobs
For larger exports, create a background job that generates an NDJSON download:
curl -sS -H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"jobType":"logs"}' \
"$BASE_URL/motor-blocks/$BLOCK_ID/exports"
When the job completes, a signed download URL is issued for the NDJSON file.
Export Formats
| Format | Use Case |
|---|---|
| NDJSON | Machine-readable, streaming-friendly |
| CSV | Available for Communications Block contact exports |
| JSON | GDPR data portability exports |
Communications Block Exports
Contact List Export
Download complete contact lists:
GET /comm-api/api/lists/{id}/contacts/export
X-Tenant-Id: your-tenant-uuid
GDPR Data Export
Comprehensive per-contact data export including profile, campaign history, tracking events, and suppression status. Delivered via email as JSON and CSV attachments.
Best Practices
- Use preview exports for quick debugging
- Schedule background exports for large datasets
- Store exports securely — they may contain PII
- Set appropriate
includePIIflags based on your compliance needs - Monitor export job status via the API