For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation
Overview Agent Access Ads ChatGPT + Codex user docs Use cases

API Reference

Post Conversion Insights

POST
/conversions/insights

Get attributed conversion totals or daily values for the authenticated ad account.

Retrieve campaign goal conversion counts and, optionally, attributed standard and custom event metrics. Goal counts include click-through and view-through conversions within the selected reporting windows. Events do not need to be campaign goals to appear in the optional event details.

Use full days in the account timezone, with an inclusive date_range.until, spanning at most 365 days. Unix and hour-range ends are exclusive. Set group_by_entity to false to combine entities for each date or breakdown; the account ID then identifies the row. Event expansion adds detail without changing matching summary metrics. Event-name filtering affects nested events, not goal counts or summary sales.

The click and view defaults apply independently. These options select the report's attribution windows; they do not change campaign conversion goals or optimization settings. If an outcome is eligible for both click-through and view-through attribution, the click takes precedence.

An event_names entry must be configured in the account's conversion event settings, including archived settings, or present in its published received-event history. Validation covers the account independently of the requested entities and dates. Newly received events without conversion settings can be selected after their history is published; retained history is not an all-time event registry. A recognized event can have no attributed activity in the requested report.

Unknown names, an empty event_names array, null, or an event selector without the expansion return HTTP 400. Unsupported reporting windows also return HTTP 400.

count counts summary rows, not conversions or nested events. Goal conversions combine click-through and view-through counts; a zero-day view window excludes views. Attributed purchase value can include both goal and non-goal purchases and is returned as an unrounded decimal string. Unavailable event amounts and currencies are null, not zero.

Non-goal-only rows can have positive event counts or sales and zero conversions. A recognized but inactive event selection can yield attributed_events: [] on a retained summary row. Empty event details do not confirm that historical data has finished processing.

Responses are limited to 2,000 summary rows and, when expanded, 2,000 event rows in total. Each event's goal-setting breakdown is also limited to 2,000 entries. Exceeding a limit returns HTTP 413 rather than a partial result. This endpoint has no pagination cursor: reduce the entity list, split the report into non-overlapping date ranges, or select fewer event names when event details exceed the limit.

See Report goal and non-goal events for a complete event-expansion request and response.

Post Conversion Insights

curl https://api.ads.openai.com/v1/conversions/insights \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $OPENAI_ADS_API_KEY" \
    -d '{
          "aggregation_level": "campaign",
          "time_ranges": [
            "{\"type\":\"date_range\",\"since\":\"2026-09-01\",\"until\":\"2026-09-07\"}"
          ],
          "group_by_entity": false
        }'
200 — success
{
  "object": "list",
  "data": [],
  "count": 0,
  "account_currency": "USD"
}
Body Parameters
JSON
aggregation_level: string

Required row entity: campaign, ad_group or ad.

time_ranges: array of string

Exactly one JSON-encoded time-range object spanning full days in the account timezone and at most 365 days. date_range.until is inclusive; unix_range.end and hour_range.until are exclusive.

attribution_time_basis: optional "conversion_time" or "ad_event_time"

Defaults: ad_event_time; omitted/null windows independently use 30-day click/1-day view. conversion_time has limited non-goal coverage.

One of the following:
"conversion_time"
"ad_event_time"
attribution_window_days: optional 7 or 14 or 30 or null

Click attribution window of 7, 14 or 30 days. Omitted or null defaults to 30.

minimum7
maximum30
One of the following:
7
14
30
breakdown: optional "device" or "country"
One of the following:
"device"
"country"
entity_ids: optional array of string

Nonempty IDs at the selected aggregation level, required when group_by_entity is true. Omit when group_by_entity is false to report across the account.

event_names: optional array of string

Requires include=[attributed_events]. Omit for all; select configured or published account events.

minItems1
maxItems500
group_by_entity: optional boolean

Group by entity when true. When false, combined rows use the ad account ID as entity_id.

include: optional array of "attributed_events"

Add event details; clock, windows and goal totals are unchanged. count counts summary rows.

include_zero_rows: optional boolean

Defaults to true. With attributed_events and false, retain rows with nonzero goal counts, summary sales or selected event counts. Sales-bearing rows may have empty event details.

time_granularity: optional "none" or "daily"
One of the following:
"none"
"daily"
view_through_attribution_window_days: optional 0 or 1 or null

View attribution window: 0 excludes views; 1 includes one day. Omitted or null defaults to 1.

minimum0
maximum1
One of the following:
0
1
Returns
count: integer
data: array of object { conversions, entity_id, attributed_events, 7 more }
conversions: integer
entity_id: string
attributed_events: optional array of object { attributed_event_count, attributed_event_value_amount, attributed_event_value_count, 10 more }
attributed_event_count: integer
attributed_event_value_amount: number or null
attributed_event_value_count: integer
attributed_event_value_currency: string or null
entity_id: string
event_kind: string
event_name: string
click_through_conversions: optional integer
conversion_event_setting_breakdowns: optional array of object { click_through_conversions, conversion_event_setting_id, view_through_conversions }
click_through_conversions: integer
conversion_event_setting_id: string
view_through_conversions: integer
country: optional string
date: optional string
device: optional string
view_through_conversions: optional integer
click_through_conversions: optional integer
country: optional string
date: optional string
device: optional string
order_created_attributed_sales: optional string or null
order_created_attributed_sales_currency: optional string
view_through_conversions: optional integer
object: string
account_currency: optional string
Returns Examples
200 — success
{
  "object": "list",
  "data": [],
  "count": 0,
  "account_currency": "USD"
}