Reports

Get campaign performance

Changed on

One message campaign's engagement funnel — sends, deliveries, opens, clicks, attribution, and the derived rates — plus its most-clicked links. Resolves newsletters and flow campaigns alike (flow campaigns carry no sent_date, and instead name the flow that sends them in flow). SMS campaigns return the SMS stat set (opted_out, failed) and no links.

Without period parameters the funnel covers the campaign's whole life. Pass period (or period=custom with start_date/end_date) to scope it to a reporting window — the same window vocabulary as every other report read, so its numbers line up with /v1/reports/campaigns rows for the same period. The response echoes the window in period; null means lifetime. top_links is always lifetime — link clicks are not stored by day.

The campaign's configuration is /v1/campaigns/{id}.

Required scope: reports_read

get/reports/campaigns/{campaign_id}

Request

  • Base URL
    https://api.privy.com/v1
  • Auth
    HTTP bearer

Path parameters

campaign_idstring required

The campaign's unique identifier (returned as campaign_id in report responses and id in campaign responses). Ids are opaque public strings — a numeric id from a Privy dashboard URL is not a valid API id and will 404; list campaigns and match by title instead.

Query parameters

period'last_7_days' | 'last_30_days' | 'last_90_days' | 'this_month' | 'last_month' | 'custom'

Scope the funnel to a date range, resolved in the account's time zone. Pass custom together with start_date and end_date. Omit entirely for the campaign's lifetime funnel (the default).

start_datestring date

Inclusive start of a custom period (ISO 8601 date). Required when period=custom, ignored otherwise.

end_datestring date

Inclusive end of a custom period (ISO 8601 date). Required when period=custom, ignored otherwise. Custom periods are capped at 366 days.

Headers

Privy-Account-Idstring

Target a subaccount instead of the main connected account. Pass a subaccount id from get_account's subaccounts list. Only direct subaccounts of the connected account are reachable — omit this for the main account itself.

Response

The campaign's engagement funnel — lifetime, or scoped to the requested period.

Example response

{
  "data": {
    "campaign_id": "kD4qN8wZr1",
    "type": "newsletter",
    "title": "June Restock Announcement",
    "channel": "email",
    "ab_test": {
      "state": "sent",
      "winning_metric": "click_rate",
      "results_source": "snapshot",
      "measured_at": "2026-06-19T09:00:00Z",
      "decision_due_at": "2026-06-19T09:00:00Z",
      "winner_selected_at": "2026-06-19T09:04:00Z",
      "completed_at": "2026-06-19T11:30:00Z",
      "winner_version_id": "cpv_YJGOjpJ",
      "selection_reason": "highest_metric",
      "audience": {
        "eligible_count": 12000,
        "test_count": 3000,
        "remainder_count": 9000
      },
      "versions": [
        {
          "id": "cpv_dkyYZmk",
          "name": "Version A",
          "is_control": true,
          "audience_share": 0.125,
          "subject": "The restock you asked for is here",
          "decision": {
            "metric_value": {
              "value": 42,
              "unit": "count"
            },
            "numerator": {
              "value": 42,
              "unit": "count"
            },
            "denominator": {
              "value": 42,
              "unit": "count"
            }
          },
          "stats": {
            "assigned": {
              "value": 42,
              "unit": "count"
            },
            "sent": {
              "value": 42,
              "unit": "count"
            },
            "delivered": {
              "value": 42,
              "unit": "count"
            },
            "delivery_rate": {
              "value": 42,
              "unit": "count"
            },
            "opened_unique": {
              "value": 42,
              "unit": "count"
            },
            "open_rate": {
              "value": 42,
              "unit": "count"
            },
            "clicked_unique": {
              "value": 42,
              "unit": "count"
            },
            "click_rate": {
              "value": 42,
              "unit": "count"
            },
            "bounced": {
              "value": 42,
              "unit": "count"
            },
            "bounce_rate": {
              "value": 42,
              "unit": "count"
            },
            "spam_reports": {
              "value": 42,
              "unit": "count"
            },
            "unsubscribed": {
              "value": 42,
              "unit": "count"
            },
            "unsubscribe_rate": {
              "value": 42,
              "unit": "count"
            },
            "opted_out": {
              "value": 42,
              "unit": "count"
            },
            "failed": {
              "value": 42,
              "unit": "count"
            },
            "attributed_orders": {
              "value": 42,
              "unit": "count"
            },
            "order_rate": {
              "value": 42,
              "unit": "count"
            },
            "attributed_revenue": {
              "value": 42,
              "unit": "count"
            },
            "average_order_value": {
              "value": 42,
              "unit": "count"
            }
          },
          "top_links": [
            {
              "url": "https://shop.example.com/collections/restock",
              "name": "Shop the restock",
              "clicks": 402
            }
          ]
        }
      ]
    },
    "sent_date": "2026-06-18",
    "flow": {
      "id": "0Rqw3Z8",
      "title": "Welcome Series"
    },
    "period": {
      "label": "last_30_days",
      "start_date": "2026-06-21",
      "end_date": "2026-07-20"
    },
    "stats": {
      "sent": {
        "value": 42,
        "unit": "count"
      },
      "delivered": {
        "value": 42,
        "unit": "count"
      },
      "delivery_rate": {
        "value": 42,
        "unit": "count"
      },
      "opened_unique": {
        "value": 42,
        "unit": "count"
      },
      "open_rate": {
        "value": 42,
        "unit": "count"
      },
      "clicked_unique": {
        "value": 42,
        "unit": "count"
      },
      "click_rate": {
        "value": 42,
        "unit": "count"
      },
      "bounced": {
        "value": 42,
        "unit": "count"
      },
      "bounce_rate": {
        "value": 42,
        "unit": "count"
      },
      "spam_reports": {
        "value": 42,
        "unit": "count"
      },
      "unsubscribed": {
        "value": 42,
        "unit": "count"
      },
      "unsubscribe_rate": {
        "value": 42,
        "unit": "count"
      },
      "opted_out": {
        "value": 42,
        "unit": "count"
      },
      "failed": {
        "value": 42,
        "unit": "count"
      },
      "attributed_orders": {
        "value": 42,
        "unit": "count"
      },
      "order_rate": {
        "value": 42,
        "unit": "count"
      },
      "attributed_revenue": {
        "value": 42,
        "unit": "count"
      },
      "average_order_value": {
        "value": 42,
        "unit": "count"
      }
    },
    "top_links": [
      {
        "url": "https://shop.example.com/collections/restock",
        "name": "Shop the restock",
        "clicks": 402
      }
    ]
  }
}

Changes

    • warning

      added the new forbidden enum value to the / response property for the response status

    • warning

      added the new forbidden enum value to the / response property for the response status

    • warning

      added the new forbidden enum value to the / response property for the response status

    • warning

      added the new forbidden enum value to the / response property for the response status

    • warning

      added the new forbidden enum value to the / response property for the response status

    • warning

      added the new segment_builder_required enum value to the / response property for the response status

    • warning

      added the new segment_builder_required enum value to the / response property for the response status

    • warning

      added the new segment_builder_required enum value to the / response property for the response status

    • warning

      added the new segment_builder_required enum value to the / response property for the response status

    • warning

      added the new segment_builder_required enum value to the / response property for the response status

    • info

      endpoint added