Customers – export customer activity events across channels
With these methods you can schedule and retrieve asynchronous CSV file exports of raw customer activity events across email, SMS, and web push channels for a specified date range.
Because the export runs asynchronously, it does not block the client – you schedule the export, then poll for its status and download the file once it is ready.
POST – schedule export
Endpoint
The server address for this request is https://api.ecdp.app/exports/channels/activity
Request parameters
| Parameter | Location | Type | Required | Description | Description |
| x-api-key | header | string | yes | API key for authentication. | Obtain from Settings > API. |
| Content-Type | header | string | yes | Request content type. | application/json |
| startDate | body | string | yes | Start of the export window. | Format: YYYY-MM-DD. Date range must not exceed 90 days. startDate must be earlier than endDate. |
| endDate | body | string | yes | End of the export window. | Format: YYYY-MM-DD. Date range must not exceed 90 days. endDate must be later than startDate. |
| channels | body | enum[] | no | Limits the events to one or more channels. If omitted, all channels are included. | Email, SMS, WebPush. Accepts multiple values as a JSON array. |
| eventTypes | body | enum[] | no | Limits the export to one or more event types. If omitted, all supported event types are included. | See Supported event types per channel below. Accepts multiple values as a JSON array. Any value outside the supported set returns 400 Bad Request. |
| fileName | body | string | no | Custom name for the exported file (without extension). | Must be a safe file name (no special characters). The .csv extension is appended automatically. |
Supported event types per channel
| Event type | SMS | Web Push | Notes | |
| Send | ✓ | ✓ | ✓ | Message send attempt or enqueue. |
| Delivery | ✓ | – | – | Delivery confirmation (email only). |
| Bounce | ✓ | ✓ | – | Hard or soft bounce. |
| Open | ✓ | – | – | Email open. |
| View | – | – | ✓ | Web Push view or impression. |
| Click | ✓ | ✓ | ✓ | Tracked link click. |
| Unsubscribe | ✓ | ✓ | ✓ | Channel opt-out. |
| Order | ✓ | ✓ | ✓ | Order attributed to the message. |
Responses
A successful request returns 200 OK with the following fields:
| Field | Type | Description |
| exportId | integer | Identifier to use when polling for status. |
| status | string | Initial export status. Queued or Processing. |
| createdAt | string | Timestamp when the export was scheduled. Timestamp is in ISO-8601 UTC format. |
| parameters | object | Echo of the request parameters: startDate, endDate, channels, eventTypes, and fileName (if provided). |
Response codes
| Code | Status | Description |
| 200 | OK | Export successfully scheduled. |
| 400 | Bad Request | Invalid or missing parameters, unsupported event type, or date range exceeds 90 days. |
| 401 | Unauthorized | Missing or invalid API key. |
| 403 | Forbidden | Insufficient permissions for this operation. |
| 500 | Internal Server Error | Server-side error. Retry the request or contact support. |
GET – check export status
Endpoint
The server address for this request is https://api.ecdp.app/exports/channels/activity/{exportId}
Request parameters
| Parameter | Location | Type | Required | Description | Description |
| x-api-key | header | string | yes | API key for authentication. | Obtain from Settings > API. |
| exportId | path | integer | yes | Export identifier returned by the schedule request. |
Responses
| Field | Type | Present when | Description |
| exportId | integer | always | Export identifier. |
| status | string | always | Current export status. Queued, Processing, Completed, Failed, or Expired. |
| createdAt | string | always | Timestamp when the export was scheduled. Timestamp is in ISO-8601 UTC format. |
| expiresAt | string | completed | Expiry timestamp of the download link. Timestamp is in ISO-8601 UTC format. |
| fileName | string | completed | Final file name with .csv extension. |
| rows | integer | completed | Number of data rows in the CSV file. Header row is not counted. |
| fileUrl | string | completed | Temporary HTTPS URL to download the CSV file. |
| error | string | failed | Description of why the export failed. |
Response codes
| Code | Status | Description |
| 200 | OK | Status returned successfully. |
| 401 | Unauthorized | Missing or invalid API key. |
| 403 | Forbidden | Insufficient permission for this operation. |
| 404 | Not Found | No export found for the specified exportId. |
| 500 | Internal Server Error | Server-side error. Retry the request or contact support. |
Example requests and responses#
Export data from a single day and from all channels
Schedule export:
Required request format: JSON
{
"startDate": "2025-03-15",
"endDate": "2025-03-15"
}Response – 200 OK
{
"exportId": "123",
"status": "Queued",
"createdAt": "2025-03-15T00:00:05Z",
"parameters": {
"startDate": "2025-03-15",
"endDate": "2025-03-15",
"channels": ["Email", "SMS", "WebPush"],
"eventTypes": []
}
}Check status
GET /exports/channels/activity/123
Response – 200 OK
{
"exportId": "123",
"status": "Completed",
"createdAt": "2025-03-15T00:00:05Z",
"expiresAt": "2025-03-16T00:00:05Z",
"fileName": "channels-activity-2025-03-15.csv",
"rows": 7,
"fileUrl": "https://download.ecdp.app/exports/123/channels-activity-2025-03-15.csv"
}Export data from a specific date rage, filtered by channel and event type
Schedule export
Required request format: JSON
{
"startDate": "2025-03-01",
"endDate": "2025-03-10",
"channels": ["Email", "WebPush"],
"eventTypes": ["Click", "Unsubscribe"],
"fileName": "activity_clicks"
}Response – 200 OK
{
"exportId": "312",
"status": "Queued",
"createdAt": "2025-03-01T00:00:02Z",
"parameters": {
"startDate": "2025-03-01",
"endDate": "2025-03-10",
"channels": ["Email", "WebPush"],
"eventTypes": ["Click", "Unsubscribe"],
"fileName": "activity_clicks"
}
}Check status
GET /exports/channels/activity/312
Response – 200 OK
{
"exportId": "312",
"status": "Completed",
"createdAt": "2025-03-01T00:00:02Z",
"expiresAt": "2025-03-02T00:00:02Z",
"fileName": "activity_clicks.csv",
"rows": 12345,
"fileUrl": "https://download.ecdp.app/exports/312/activity_clicks.csv"
}CSV file structure#
The file contains one event per row. Columns appear in the following fixed order:
| # | Column | Description |
| 1 | Date | ISO-8601 UTC timestamp of the event. |
| 2 | Channel | Email, Sms, or WebPush. |
| 3 | EventType | One of the supported event types. |
| 4 | CustomerId | Internal ECDP customer identifier. |
| 5 | Customer email address. | |
| 6 | Phone | Customer phone number. |
| 7 | CrmId | Customer CRM identifier. |
| 8 | MessageType | Newsletter, Scenario, or channel-specific type where applicable. |
| 9 | MessageId | Internal message identifier. |
| 10 | MessageSubjectOrName | Email subject, Web Push notification name, or SMS campaign name (if available). |
| 11 | WebsiteId | Web Push only; empty for all other channels. |
| 12 | RelatedOrderId | Order attributed to the message, if applicable; empty otherwise. |
Empty or unknown fields are displayed as empty CSV cells.
Sample CSV output #
Date,Channel,EventName,CustomerId,Email,Phone,CrmId,MessageType,MessageId,MessageSubjectOrName,WebsiteId,RelatedOrderId
2025-03-01T10:05:33Z,Email,Click,771100,bob@example.com,,101,"Newsletter",11880,"Flash Sale",,
2025-03-01T10:45:09Z,Email,Unsubscribe,771100,bob@example.com,,101,"Newsletter",11880,"Flash Sale",,
2025-03-01T11:20:02Z,WebPush,Click,902233,,,144,"Scenario",4501,"Cart Reminder",12,14577Validation and behavior rules
- The date range (endDate − startDate + 1) must not exceed 90 days.
- Channels and eventTypes both accept multiple values as JSON arrays.
- If channels is omitted, all three channels (Email, SMS, Web Push) are included.
- If eventTypes is omitted, all event types supported by the selected channels are included.
- Poll the status endpoint until status is Completed, Failed, or Expired before attempting to download.
Reference documentation
Swagger – Exports