v1.0.0
OpenAPI 3.1.0

Get delivery data for a newsletter

US region

Client Libraries

Get delivery data for a newsletter

Returns information about the "deliveries" (rendered messages) sent to your recipients for a specific newsletter.

Provide query parameters to refine the metrics you want to return. Use start_ts and end_ts to find messages within a time range. If your request doesn't include start_ts and end_ts parameters, we'll return up to 6 months of results beginning with the first delivery generated from the newsletter. If your start_ts and end_ts 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.

Path Parameters
  • newsletter_id
    Type: integer
    required

    The identifier of a newsletter.

Query Parameters
  • start
    Type: string

    The token for the page of results you want to return. Responses contain a next property. Use this property as the start value to return the next page of results.

  • limit
    Type: integer

    The maximum number of results you want to retrieve per page.

  • metric
    Type: stringenum

    Determines the metric(s) you want to return.

    values
    • attempted
    • sent
    • delivered
    • opened
    • clicked
  • start_ts
    Type: integerFormat: unix timestamp

    The beginning timestamp for your query.

  • end_ts
    Type: integerFormat: unix timestamp

    The ending timestamp for your query.

  • get_tracked_responses
    Type: boolean

    If true, the response includes tracked_responses for each message—an object containing tracked response option names for in-app survey responses.

Responses
  • application/json
  • 404

    The newsletter you requested does not exist.

  • 429

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

Request Example for get/v1/newsletters/{newsletter_id}/messages
curl 'https://api.customer.io/v1/newsletters/1/messages?start=&limit=1&metric=attempted&start_ts=1&end_ts=1&get_tracked_responses=false' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "messages": [
    {
      "id": "dgOq6QWq6QUDAAF22PaOyFVqVxHY3rI5fsg=",
      "deduplicate_id": "dgOq6QWq6QUDAAF22PaOyFVqVxHY3rI5fsg=:1609957872",
      "msg_template_id": 178,
      "action_id": null,
      "customer_id": "1a55d8d1-b13d-4f1f-858f-a93ef21e3a7d",
      "recipient": "person@email.com",
      "subject": "Did you get that thing I sent you?",
      "metrics": {
        "delivered": 1609957872,
        "sent": 1609957832
      },
      "created": 1609957805,
      "failure_message": null,
      "newsletter_id": 72,
      "content_id": 178,
      "campaign_id": null,
      "broadcast_id": null,
      "type": "email",
      "forgotten": false
    }
  ]
}