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

List Campaigns

GET
/campaigns

Get all campaigns for an ad account.

List Campaigns

curl https://api.ads.openai.com/v1/campaigns \
    -H "Authorization: Bearer $OPENAI_ADS_API_KEY"
200 — Example
{
  "data": [
    {
      "id": "id",
      "bidding_type": "bidding_type",
      "budget": {
        "daily_spend_limit_micros": 0,
        "lifetime_spend_limit_micros": 0
      },
      "created_at": 0,
      "description": "description",
      "end_time": 0,
      "name": "name",
      "product_feed_id": "product_feed_id",
      "start_time": 0,
      "status": "status",
      "updated_at": 0,
      "advertiser_phone_verification_required": true,
      "agent_destination_id": "agent_destination_id",
      "billing_event_type": "billing_event_type",
      "business_agent_id": "business_agent_id",
      "conversion_event_setting_ids": [
        "string"
      ],
      "enable_dynamic_creative": true,
      "geographic_targeting_blocked": true,
      "landing_page_configuration": {
        "query_string_template": "query_string_template"
      },
      "managed_optimization_goal": "managed_optimization_goal",
      "mode": "mode",
      "objective": "objective",
      "review_resume_confirmation": {
        "episode_id": "episode_id",
        "reason": "reason",
        "required_at": 0,
        "system_paused": true
      },
      "serving_issues": [
        {
          "code": "ad_account_suspended"
        }
      ],
      "targeting": {
        "custom_audiences": {
          "ids": [
            "string"
          ]
        },
        "excluded_custom_audiences": {
          "ids": [
            "string"
          ]
        },
        "excluded_locations": {
          "countries": [
            "string"
          ],
          "include": [
            {
              "id": "id",
              "country_code": "country_code",
              "name": "name",
              "region_code": "region_code",
              "type": "type"
            }
          ]
        },
        "locations": {
          "countries": [
            "string"
          ],
          "include": [
            {
              "id": "id",
              "country_code": "country_code",
              "name": "name",
              "region_code": "region_code",
              "type": "type"
            }
          ]
        },
        "platforms": {
          "included": [
            "ios_app"
          ]
        }
      }
    }
  ],
  "first_id": "first_id",
  "has_more": true,
  "last_id": "last_id",
  "object": "object"
}
Query Parameters
after: optional string
before: optional string
include: optional array of "serving_issues"
limit: optional integer
minimum1
maximum500
name: optional string
pattern^.*\S.*$
minLength3
maxLength1000
order: optional "asc" or "desc"
One of the following:
"asc"
"desc"
Returns
data: array of object { id, bidding_type, budget, 22 more }
id: string
bidding_type: string
budget: object { daily_spend_limit_micros, lifetime_spend_limit_micros }
daily_spend_limit_micros: optional integer
lifetime_spend_limit_micros: optional integer
created_at: integer
formatunixtime
description: string or null
end_time: integer or null
formatunixtime
name: string
product_feed_id: string or null
start_time: integer or null
formatunixtime
status: string
updated_at: integer
formatunixtime
advertiser_phone_verification_required: optional boolean
agent_destination_id: optional string or null
billing_event_type: optional string
business_agent_id: optional string or null
conversion_event_setting_ids: optional array of string
enable_dynamic_creative: optional boolean
geographic_targeting_blocked: optional boolean
landing_page_configuration: optional object { query_string_template } or null
query_string_template: string or null
managed_optimization_goal: optional string or null
mode: optional string or null
objective: optional string
review_resume_confirmation: optional object { episode_id, reason, required_at, system_paused } or null
episode_id: string
reason: string
required_at: integer
formatunixtime
system_paused: boolean
serving_issues: optional array of object { code }
code: "ad_account_suspended" or "ad_account_brand_review_missing_favicon" or "ad_account_brand_review_escalated_review" or 23 more
One of the following:
"ad_account_suspended"
"ad_account_brand_review_missing_favicon"
"ad_account_brand_review_escalated_review"
"ad_account_brand_review_rejected"
"ad_account_brand_review_in_progress"
"ad_account_payment_method_missing_or_unauthorized"
"ad_account_threshold_payment_failed"
"ad_account_persona_verification_not_approved"
"ad_account_persona_verification_step_up_required"
"campaign_not_active"
"campaign_not_started"
"campaign_ended"
"campaign_has_no_ad_groups"
"campaign_has_no_serving_ready_ad_groups"
"product_feed_country_targeting_blocked"
"product_feed_country_targeting_limited"
"ad_group_not_active"
"ad_group_has_no_ads"
"campaign_budget_exhausted"
"ad_account_budget_exhausted"
"review_not_approved"
"landing_page_crawl_issue"
"ad_in_review"
"partial_serving_review_not_approved"
"partial_serving_landing_page_crawl_issue"
"partial_serving_ad_in_review"
targeting: optional object { custom_audiences, excluded_custom_audiences, excluded_locations, 2 more }
custom_audiences: optional object { ids }
ids: array of string
excluded_custom_audiences: optional object { ids }
ids: array of string
excluded_locations: optional object { countries, include }
countries: optional array of string
include: optional array of object { id, country_code, name, 2 more }
id: string
country_code: string
name: string
region_code: string or null
type: string
locations: optional object { countries, include }
countries: optional array of string
include: optional array of object { id, country_code, name, 2 more }
id: string
country_code: string
name: string
region_code: string or null
type: string
platforms: optional object { included }
included: optional array of "ios_app" or "android_app" or "web" or 3 more
One of the following:
"ios_app"
"android_app"
"web"
"desktop_web"
"ios_web"
"android_web"
first_id: string or null
has_more: boolean
last_id: string or null
object: string
Returns Examples
200 — Example
{
  "data": [
    {
      "id": "id",
      "bidding_type": "bidding_type",
      "budget": {
        "daily_spend_limit_micros": 0,
        "lifetime_spend_limit_micros": 0
      },
      "created_at": 0,
      "description": "description",
      "end_time": 0,
      "name": "name",
      "product_feed_id": "product_feed_id",
      "start_time": 0,
      "status": "status",
      "updated_at": 0,
      "advertiser_phone_verification_required": true,
      "agent_destination_id": "agent_destination_id",
      "billing_event_type": "billing_event_type",
      "business_agent_id": "business_agent_id",
      "conversion_event_setting_ids": [
        "string"
      ],
      "enable_dynamic_creative": true,
      "geographic_targeting_blocked": true,
      "landing_page_configuration": {
        "query_string_template": "query_string_template"
      },
      "managed_optimization_goal": "managed_optimization_goal",
      "mode": "mode",
      "objective": "objective",
      "review_resume_confirmation": {
        "episode_id": "episode_id",
        "reason": "reason",
        "required_at": 0,
        "system_paused": true
      },
      "serving_issues": [
        {
          "code": "ad_account_suspended"
        }
      ],
      "targeting": {
        "custom_audiences": {
          "ids": [
            "string"
          ]
        },
        "excluded_custom_audiences": {
          "ids": [
            "string"
          ]
        },
        "excluded_locations": {
          "countries": [
            "string"
          ],
          "include": [
            {
              "id": "id",
              "country_code": "country_code",
              "name": "name",
              "region_code": "region_code",
              "type": "type"
            }
          ]
        },
        "locations": {
          "countries": [
            "string"
          ],
          "include": [
            {
              "id": "id",
              "country_code": "country_code",
              "name": "name",
              "region_code": "region_code",
              "type": "type"
            }
          ]
        },
        "platforms": {
          "included": [
            "ios_app"
          ]
        }
      }
    }
  ],
  "first_id": "first_id",
  "has_more": true,
  "last_id": "last_id",
  "object": "object"
}