Create Conversion Event Setting
POST
/conversions/event_settingsCreate a conversion definition for the authenticated ad account and connect it to one or more conversion sources.
Create Conversion Event Setting
curl https://api.ads.openai.com/v1/conversions/event_settings \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $OPENAI_ADS_API_KEY" \
-d '{
"attribution_window_days": 0,
"event_type": "x",
"name": "x",
"source_ids": [
"string"
]
}'200 — Example
{
"id": "id",
"ad_account_id": "ad_account_id",
"archived": true,
"attribution_window_days": 0,
"campaigns": [
{
"id": "id",
"name": "name"
}
],
"custom_event_name": "custom_event_name",
"event_type": "event_type",
"name": "name",
"source_ids": [
"string"
],
"sources": [
{
"id": "id",
"name": "name"
}
],
"version": 0
}Body ParametersJSON
attribution_window_days: integer
Use 30 unless this account is enabled for custom attribution windows.
event_type: string
A supported standard event or custom. See https://developers.openai.com/ads/supported-events.
minLength1
Returns Examples
200 — Example
{
"id": "id",
"ad_account_id": "ad_account_id",
"archived": true,
"attribution_window_days": 0,
"campaigns": [
{
"id": "id",
"name": "name"
}
],
"custom_event_name": "custom_event_name",
"event_type": "event_type",
"name": "name",
"source_ids": [
"string"
],
"sources": [
{
"id": "id",
"name": "name"
}
],
"version": 0
}