---
title: "Event-level report"
method: POST
path: "/measurement/campaigns/{campaign_id}/events_report"
tags: ["Queries"]
---

# Event-level report

`POST /measurement/campaigns/{campaign_id}/events_report`

## Request

- Base URL: `https://api.magellan.ai/v2`
- URL: `https://api.magellan.ai/v2/measurement/campaigns/{campaign_id}/events_report`
- Auth: API key in header `Authorization`

Creates an event-level reporting query for a campaign. Output is a CSV of raw event data based on the parameters selected. The report is produced asynchronously; poll the returned async query or provide a `callbackUrl` to be notified on completion.

## Path parameters

- `campaign_id` string, required

## Request body

- object
  - `startDate` string, date, required: A start date in YYYY-MM-DD format.
  - `endDate` string, date, required: An end date in YYYY-MM-DD format.
  - `timezone` string: The timezone used to interpret the date range. Defaults to the campaign's configured time zone (or UTC).
  - `attributionMethodology` 'last_touch' | 'equal_credit' | 'equal_credit_adjusted_display_weight': Methodology option between last_touch, equal_credit, and equal_credit_adjusted_display_weight. If blank or broadcast, defaults to campaign setting (or last_touch).
  - `dateFilterSource` 'exposure' | 'event': Export filter option by exposure date or event date. Defaults to campaign setting (or exposure).
  - `callbackUrl` string, uri: HTTPS URL to receive completion/failure events.
  - `attributionWindow` 1 | 3 | 7 | 14 | 30 | 60 | 90: How many days after an exposure a related conversion/response event may be attributed to it. (Allowed: 1/3/7/14/30/60/90 | defaults to campaign setting or 30)
  - `eventTypes` string[]: Event type filters. Allowed values include: view, identify, lead, product, add_to_cart, checkout, code, purchase, listen_link_click, install. Defaults to all.
  - `lineItems` string[]: Filter by specific line items. Accepts line item names, podcast names, or ad IDs. On campaigns that track YouTube, pass "YouTube" to select YouTube traffic. Defaults to all campaign line items.
  - `ronDynamicBreakout` boolean: Breakout RON & Dynamic line items in the report. Defaults to false.
  - `recursivePayloadDestructure` boolean: Select whether you would like to destructure the payload recursively. Defaults to false.
  - `youtubeOnly` boolean: Limit the report to YouTube line items when YouTube is enabled for the campaign. Defaults to false.
  - `usExposuresOnly` boolean: Limit the report to US exposures only. Defaults to false.
  - `includeMatchSource` boolean: Include a matched_source column in the report indicating how each event was matched (e.g. ip, household, etc.). Defaults to false.
  - `includePublisherClientName` boolean: Include a publisher_client_name column in the report identifying the publisher client associated with each line item (dynamic ad, baked-in ad, etc.). Defaults to false.

## Response `200`

OK — report enqueued. The response echoes back the resolved report parameters alongside the async query status.

- EventReportAsyncExport: Async export for an event-level report query. Echoes back the resolved report parameters alongside the export status.
  - `id` integer, required: Unique identifier for the async export.
  - `callbackUrl` string, uri, nullable: The callback URL provided in the request, if any.
  - `campaignId` string, required: The campaign identifier.
  - `attributionMethodology` string: The attribution methodology used for the report.
  - `attributionWindow` integer: The attribution window in days.
  - `lastNDays` integer, nullable: Rolling date range in days. Null when a fixed date range is used.
  - `dateFilterSource` string: Whether the date range was applied to exposure dates or event dates.
  - `startDate` string, date: The start date of the report.
  - `endDate` string, date: The end date of the report.
  - `eventTypes` string[]: The event types included in the report.
  - `lineItems` string[]: The line items requested, as provided. Omitted when no line items were requested.
  - `timezone` string: The timezone used for the report.
  - `ronDynamicBreakout` boolean: Whether RON & Dynamic line items are broken out.
  - `recursivePayloadDestructure` boolean: Whether payload is recursively destructured.
  - `youtubeOnly` boolean: Whether the report is limited to YouTube line items.
  - `usExposuresOnly` boolean: Whether the report is limited to US exposures.
  - `includeMatchSource` boolean: Whether the matched_source column is included in the report.
  - `includePublisherClientName` boolean: Whether the publisher_client_name column is included in the report.
  - `status` 'PENDING' | 'RUNNING' | 'COMPLETE' | 'FAILED', required: Current status of the report.
  - `results` string, uri: Download URL for the CSV report. Only present when status is COMPLETE.

## Other responses

- `302`: Duplicate query found — returns the original async export instead of creating a new one.
- `401`: Unauthorized. When the access token is missing, invalid, expired or revoked, the body is empty. When the token is valid but its user may not access the resource, the body is an `Error`.
- `403`: The access token has a scope, such as an MCP token. The v2 API only accepts unscoped tokens.
- `404`: Not Found
- `422`: Unprocessable Content

## Changes

- **2026-11-03** `beceb462c707`: 1 breaking, 14 warning, 6 info
  - added `#/components/schemas/ReportCommonAttributes, subschema #2` to the request body `allOf` list
  - removed the request property `attributionMethodology`
  - removed the request property `attributionWindow`
  - removed the request property `callbackUrl`
  - …17 more

[Operation history](https://skmtc.dev/magellan/apis/magellan-ai-api/changes/measurement/campaigns/:campaign_id/events_report/post.md)

---

[API](https://skmtc.dev/magellan/apis/magellan-ai-api.md) - [All operations](https://skmtc.dev/magellan/apis/magellan-ai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/magellan/apis/magellan-ai-api/revisions/beceb462c707?raw)
