Export information about deliveries
Provide filters for the newsletter, campaign, or action you want to return delivery information from. This endpoint starts an export, but you cannot download your export from this endpoint. Use the /exports/{export_id} endpoint to download your export.
Use the start and end to find messages within a time range. If your request doesn't include start and end parameters, we'll return the most recent 6 months of messages. If your start and end range is more than 12 months, we'll return 12 months of data from the most recent timestamp in your request. Timestamps reflect when deliveries were created in our system, not when they were actually sent to recipients. There may be a delay between creation and sending.
Contains properties shared by export filters.
- newsletterType: integer
_id requiredThe ID of a newsletter you want to export information from.
- attributesType: array string[]
Recipient attributes you want to include as extra columns in your export. You can't include event or trigger properties.
- draftsType: boolean
If true, your request returns both drafts and active/sent messages.
- endType: integerFormat: unix timestamp
The unix timestamp representing the end of the export.
- metricType: stringenum
Determines the metric(s) you want to return.
values- created
- attempted
- sent
- delivered
- opened
- startType: integerFormat: unix timestamp
The unix timestamp representing the beginning of the export.
- templateType: integer
_id Restrict the export to a specific message template (content) within the selected campaign, newsletter, or transactional message.
- application/json
- 400
The request is malformed.
- 429
Your request is over the 10-per-second limit.
curl https://api.customer.io/v1/exports/deliveries \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"newsletter_id": 999,
"start": 1517529600,
"end": 1517702400,
"attributes": [
""
],
"metric": "created",
"drafts": true,
"template_id": 1
}'
{
"export": {
"id": "111,",
"deduplicate_id": "110:1530296738",
"type": "deliveries",
"failed": false,
"description": "Full deliveries export (created via the api)",
"downloads": 0,
"created_at": 1530296742,
"updated_at": 1530296742
}
}Returns an export.