Skip to content

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

ParameterLocationTypeRequiredDescriptionDescription
x-api-keyheaderstringyesAPI key for authentication.Obtain from Settings > API.
Content-TypeheaderstringyesRequest content type.application/json
startDatebodystringyesStart of the export window.Format: YYYY-MM-DD.
Date range must not exceed 90 days. startDate must be earlier than endDate.
endDatebodystringyesEnd of the export window.Format: YYYY-MM-DD.
Date range must not exceed 90 days. endDate must be later than startDate.
channelsbodyenum[]noLimits the events to one or more channels. If omitted, all channels are included.Email, SMS, WebPush. Accepts multiple values as a JSON array.
eventTypesbodyenum[]noLimits 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.
fileNamebodystringnoCustom 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 typeEmailSMSWeb PushNotes
SendMessage send attempt or enqueue.
DeliveryDelivery confirmation (email only).
BounceHard or soft bounce.
OpenEmail open.
ViewWeb Push view or impression.
ClickTracked link click.
UnsubscribeChannel opt-out.
OrderOrder attributed to the message.

Responses

A successful request returns 200 OK with the following fields:

FieldTypeDescription
exportIdintegerIdentifier to use when polling for status.
statusstringInitial export status. Queued or Processing.
createdAtstringTimestamp when the export was scheduled. Timestamp is in ISO-8601 UTC format.
parametersobjectEcho of the request parameters: startDate, endDate, channels, eventTypes, and fileName (if provided).

Response codes

CodeStatusDescription
200OKExport successfully scheduled.
400Bad RequestInvalid or missing parameters, unsupported event type, or date range exceeds 90 days.
401UnauthorizedMissing or invalid API key.
403ForbiddenInsufficient permissions for this operation.
500Internal Server ErrorServer-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

ParameterLocationTypeRequiredDescriptionDescription
x-api-keyheaderstringyesAPI key for authentication.Obtain from Settings > API.
exportIdpathintegeryesExport identifier returned by the schedule request.

Responses

FieldTypePresent whenDescription
exportIdintegeralwaysExport identifier.
statusstringalwaysCurrent export status. Queued, Processing, Completed, Failed, or Expired.
createdAtstringalwaysTimestamp when the export was scheduled. Timestamp is in ISO-8601 UTC format.
expiresAtstringcompletedExpiry timestamp of the download link. Timestamp is in ISO-8601 UTC format.
fileNamestringcompletedFinal file name with .csv extension.
rowsintegercompletedNumber of data rows in the CSV file. Header row is not counted.
fileUrlstringcompletedTemporary HTTPS URL to download the CSV file.
errorstringfailedDescription of why the export failed.

Response codes

CodeStatusDescription
200OKStatus returned successfully.
401UnauthorizedMissing or invalid API key.
403ForbiddenInsufficient permission for this operation.
404Not FoundNo export found for the specified exportId.
500Internal Server ErrorServer-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:

#ColumnDescription
1DateISO-8601 UTC timestamp of the event.
2ChannelEmail, Sms, or WebPush.
3EventTypeOne of the supported event types.
4CustomerIdInternal ECDP customer identifier.
5EmailCustomer email address.
6PhoneCustomer phone number.
7CrmIdCustomer CRM identifier.
8MessageTypeNewsletter, Scenario, or channel-specific type where applicable.
9MessageIdInternal message identifier.
10MessageSubjectOrNameEmail subject, Web Push notification name, or SMS campaign name (if available).
11WebsiteIdWeb Push only; empty for all other channels.
12RelatedOrderIdOrder 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,14577

Validation 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

https://api.ecdp.app/swagger/index.html