v1.0.0
OpenAPI 3.1.0

Export information about deliveries

US region

Client Libraries

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.

Body
application/json
    • Contains properties shared by export filters.

      • newsletter_id
        Type: integer
        required

        The ID of a newsletter you want to export information from.

      • attributes
        Type: array string[]

        Recipient attributes you want to include as extra columns in your export. You can't include event or trigger properties.

      • drafts
        Type: boolean

        If true, your request returns both drafts and active/sent messages.

      • end
        Type: integerFormat: unix timestamp

        The unix timestamp representing the end of the export.

      • metric
        Type: stringenum

        Determines the metric(s) you want to return.

        values
        • created
        • attempted
        • sent
        • delivered
        • opened
      • start
        Type: integerFormat: unix timestamp

        The unix timestamp representing the beginning of the export.

      • template_id
        Type: integer

        Restrict the export to a specific message template (content) within the selected campaign, newsletter, or transactional message.

Responses
  • application/json
  • 400

    The request is malformed.

  • 429

    Your request is over the 10-per-second limit.

Request Example for post/v1/exports/deliveries
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
  }
}