v1.0.0
OpenAPI 3.1.0

Get campaign journey metrics

US region

Client Libraries

Get campaign journey metrics

Returns a list of Journey Metrics for your campaign. These metrics show how many people triggered your campaign, were messaged, etc for the time period and "resolution" you set. You must provide the start, end, and resolution parameters or your request will return 400.

Metrics in the response are arrays, and each index in the array corresponds to the resolution in your request. If you request metrics in days, the first result in each metric array is the first day of results and each successive increment represents another day.

Each increment represents the number of journeys that started within a time period and eventually achieved a particular metric. For example, array index 0 for the converted metric represents the number of journeys that started on the first day/month of results that achieved a conversion.

Path Parameters
  • campaign_id
    Type: integer
    required

    The ID of the campaign that you want to trigger or return information about.

Query Parameters
  • start
    Type: integerFormat: unix timestamp
    required

    The unix timestamp for the beginning of your journey metrics report.

  • end
    Type: integerFormat: unix timestamp
    required

    The unix timestamp for the end of your journey metrics report.

  • resolution
    Type: stringenum
    required

    Determines the increment for journey metrics—hourly, daily, weekly, or monthly.

    values
    • hours
    • hourly
    • days
    • daily
    • weeks
    • weekly
    • months
    • monthly
Responses
  • application/json
  • 400

    You may have omitted query parameters or the start time occurred after the end time. The campaignID or actionID may also be invalid.

  • 404

    The campaign and/or action do not exist.

  • 429

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

Request Example for get/v1/campaigns/{campaign_id}/journey_metrics
curl 'https://api.customer.io/v1/campaigns/3/journey_metrics?start=1652718066&end=1&resolution=hours' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "journey_metric": {
    "started": [
      1
    ],
    "activated": [
      1
    ],
    "exited_early": [
      1
    ],
    "finished": [
      1
    ],
    "converted": [
      1
    ],
    "never_activated": [
      1
    ],
    "messaged": [
      1
    ]
  }
}