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

Create Ad Group

POST
/ad_groups

Create an ad group for a campaign.

Field notes

For target bidding, set strategy to target_cpc for clicks or target_cpa for conversions and provide target_micros. Even an explicit fixed_bid request can select a target for eligible standard ad groups. Check the returned bidding_config before activation. Targets return target_strategy and target_micros. Fixed bids return strategy and max_bid_micros.

To adjust bids for matched customers without changing campaign eligibility, see Custom Audiences.

Small audiences can be eligible for campaign exclusion without meeting the minimum size for bid adjustments. Don't infer bid eligibility from ready status or a matched-count range. The server validates eligibility when you save the ad group.

Product-set filters support title, body, item_id, offer_id, price, target_url, image_url, product_category, brand, seller_name, external_seller_id, star_rating, condition, and age_group. Use gt, gte, lt, and lte only with price or star_rating.

Context hints provide extra information on when you think your ads might be useful, and help guide when they appear. Provide a list of descriptions or keywords for when the product or service might be useful to show.

Micros are millionths of the main currency unit, for example, dollars. The max_bid_micros field is per event, so a $60 CPM ($0.06 per impression) is passed as 60000 to the API. Currency fields respect your ad account's default currency.

Match the campaign billing event. Impression-billed conversion campaigns require an oCPM-enabled account; qualified-lead and Conversations campaigns require impression billing and eligibility for those campaign modes. For a click-billed conversion campaign (oCPC), set bidding_config.billing_event_type to click. In a USD account, a legacy max_bid_micros of 100000000 can select a $100 Target CPA for eligible standard ad groups. Product-feed requests keep the fixed CPA bid unless you explicitly select an eligible target. For a product-feed oCPC campaign in open beta, use the same POST /ad_groups endpoint. The ad group automatically inherits the campaign's product feed. Include product_set only when you want to specify product filters; its product_feed_id must match the campaign's feed. For the full setup and reporting workflow, see Conversion-Optimized Campaigns and Product Feeds.

Create Ad Group

curl https://api.ads.openai.com/v1/ad_groups \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $OPENAI_ADS_API_KEY" \
    -d '{
          "bidding_config": {
            "billing_event_type": "impression"
          },
          "campaign_id": "campaign_id",
          "name": "xxx",
          "status": "active"
        }'
200 — Example
{
  "id": "id",
  "bidding_config": {
    "billing_event_type": "billing_event_type",
    "custom_audience_bid_multipliers": [
      {
        "bid_multiplier_micros": 0,
        "custom_audience_id": "custom_audience_id"
      }
    ],
    "max_bid_micros": 0,
    "strategy": "fixed_bid",
    "target_micros": 0,
    "target_strategy": "target_cpc"
  },
  "context_hints": [
    "string"
  ],
  "created_at": 0,
  "description": "description",
  "name": "name",
  "status": "status",
  "updated_at": 0,
  "advertiser_phone_verification_required": true,
  "enable_dynamic_creative": true,
  "geographic_targeting_blocked": true,
  "landing_page_configuration": {
    "query_string_template": "query_string_template"
  },
  "product_set": {
    "filters": [
      {
        "field": "field",
        "operator": "operator",
        "values": [
          "string"
        ]
      }
    ],
    "product_feed_id": "product_feed_id"
  },
  "serving_issues": [
    {
      "code": "ad_account_suspended"
    }
  ]
}
Header Parameters
"Idempotency-Key": optional string
pattern.*\S.*
minLength1
maxLength255
Body Parameters
JSON
bidding_config: object { billing_event_type, custom_audience_bid_multipliers, max_bid_micros, 2 more }
billing_event_type: "impression" or "click"

Match the campaign billing event: impression for impression campaigns and click for click campaigns. Conversion campaigns support click billing or, for accounts enabled for oCPM, impression billing. Qualified-lead and Conversations campaigns require impression billing and eligibility for those campaign modes.

One of the following:
"impression"
"click"
custom_audience_bid_multipliers: optional array of object { bid_multiplier_micros, custom_audience_id }
bid_multiplier_micros: integer

Bid multiplier in millionths: 100000 is 0.1x and 10000000 is 10x.

minimum100000
maximum10000000
custom_audience_id: string

Audience returned by GET /custom_audiences?intended_use=bid_multiplier. Exclusion eligibility alone does not imply bid-adjustment eligibility.

max_bid_micros: optional integer

Bid amount in account-currency micros per event. For example, USD 60 CPM is 60000 micros per impression. When a legacy bid selects target bidding, this amount sets the target average cost per outcome; strategy selection can depend on account eligibility. When strategy is explicitly target_cpa or target_cpc, omit max_bid_micros and provide target_micros instead.

minimum1
maximum30400000000000
strategy: optional "fixed_bid" or "maximize_clicks" or "maximize_conversions" or 2 more

To use the default AutoBid strategy for clicks or conversions, omit both strategy and max_bid_micros. When creating an ad group or changing its strategy, you can send max_bid_micros and either omit strategy or set it to fixed_bid. On enrolled accounts, this selects target_cpa for eligible conversion ad groups and target_cpc for eligible click ad groups in any supported account currency. Otherwise, including for Reach campaigns, it selects fixed_bid. To update a fixed bid amount, send max_bid_micros with the existing billing_event_type and omit strategy. To update a target bid amount, send the existing billing_event_type, explicitly set strategy to the existing target_cpa or target_cpc, and send target_micros; omit max_bid_micros.

One of the following:
"fixed_bid"
"maximize_clicks"
"maximize_conversions"
"target_cpc"
"target_cpa"
target_micros: optional integer

Target average cost per outcome in account-currency micros. Requires strategy to be set to target_cpa or target_cpc.

minimum1
campaign_id: string

Parent campaign ID in the authenticated ad account.

name: string
pattern^.*\S.*$
minLength3
maxLength1000
status: "active" or "paused"
One of the following:
"active"
"paused"
context_hints: optional array of string

Descriptions or keywords for situations where the product or service would be useful. These help guide when ads appear.

maxItems2000
description: optional string
enable_dynamic_creative: optional boolean
landing_page_configuration: optional object { query_string_template }
query_string_template: optional string
maxLength2048
product_set: optional object { product_feed_id, filters } or null

Product filters; omit to inherit the campaign feed without additional filters. If supplied, product_feed_id must match the campaign feed.

product_feed_id: string
filters: optional array of object { field, operator, values }
field: string

Feed attribute to filter. Filters are combined with AND. You can repeat a field to express a bounded range, for example price gte a lower bound and price lte an upper bound.

operator: "in" or "not_in" or "gt" or 6 more

Use in for membership; gt, gte, lt and lte only with price or star_rating.

One of the following:
"in"
"not_in"
"gt"
"gte"
"lt"
"lte"
"contains"
"not_contains"
"starts_with"
values: array of string

Match values. Numeric comparisons still use strings, for example ["4.5"].

Returns
id: string
bidding_config: object { billing_event_type, custom_audience_bid_multipliers, max_bid_micros, 3 more }
billing_event_type: string
custom_audience_bid_multipliers: optional array of object { bid_multiplier_micros, custom_audience_id }
bid_multiplier_micros: integer
custom_audience_id: string
max_bid_micros: optional integer
strategy: optional "fixed_bid" or "automated_bid" or "maximize_clicks" or "maximize_conversions"
One of the following:
"fixed_bid"
"automated_bid"
"maximize_clicks"
"maximize_conversions"
target_micros: optional integer
target_strategy: optional "target_cpc" or "target_cpa"

For target bidding, this field identifies the strategy and target_micros gives the amount. Use strategy in requests.

One of the following:
"target_cpc"
"target_cpa"
context_hints: array of string
created_at: integer
formatunixtime
description: string or null
name: string
status: string
updated_at: integer
formatunixtime
advertiser_phone_verification_required: optional boolean
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
product_set: optional object { filters, product_feed_id } or null
filters: array of object { field, operator, values }
field: string
operator: string
values: array of string
product_feed_id: string
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 20 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"
"ad_group_not_active"
"ad_group_has_no_ads"
"ad_group_has_no_serving_ready_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"
Returns Examples
200 — Example
{
  "id": "id",
  "bidding_config": {
    "billing_event_type": "billing_event_type",
    "custom_audience_bid_multipliers": [
      {
        "bid_multiplier_micros": 0,
        "custom_audience_id": "custom_audience_id"
      }
    ],
    "max_bid_micros": 0,
    "strategy": "fixed_bid",
    "target_micros": 0,
    "target_strategy": "target_cpc"
  },
  "context_hints": [
    "string"
  ],
  "created_at": 0,
  "description": "description",
  "name": "name",
  "status": "status",
  "updated_at": 0,
  "advertiser_phone_verification_required": true,
  "enable_dynamic_creative": true,
  "geographic_targeting_blocked": true,
  "landing_page_configuration": {
    "query_string_template": "query_string_template"
  },
  "product_set": {
    "filters": [
      {
        "field": "field",
        "operator": "operator",
        "values": [
          "string"
        ]
      }
    ],
    "product_feed_id": "product_feed_id"
  },
  "serving_issues": [
    {
      "code": "ad_account_suspended"
    }
  ]
}