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

Update Ad

POST
/ads/{ad_id}

Update an ad.

All fields are optional on update. If you include creative, send its required type, title, and body fields. A single-image creative also needs its image and destination fields. status accepts active, paused, or archived.

For an ad with multiple images, omitting creative.file_ids preserves the images; an explicit array replaces them. Omitting creative.target_url preserves the saved destination; an explicit value applies to every image. Don't send a singular creative.file_id for an ad with multiple images. To switch an existing single-image ad to multiple images, send type=chat_card, 4–6 distinct square-image file_ids, and a target_url, along with title and body. The account, campaign, and ad group must support multiple images.

Update Ad

curl https://api.ads.openai.com/v1/ads/$AD_ID \
    -X POST \
    -H "Authorization: Bearer $OPENAI_ADS_API_KEY"
200 — Example
{
  "id": "id",
  "created_at": 0,
  "creative": {
    "body": "body",
    "target_url": "target_url",
    "title": "title",
    "type": "chat_card",
    "file_id": "file_id",
    "image_crop": {
      "height": 0,
      "width": 0,
      "x": 0,
      "y": 0
    },
    "image_url": "image_url",
    "images": [
      {
        "file_id": "file_id",
        "image_url": "image_url",
        "item_id": "item_id"
      }
    ],
    "price": "price"
  },
  "name": "name",
  "review": {
    "status": "in_review",
    "reason": "crawl_failed",
    "screenshot_url": "screenshot_url"
  },
  "review_status": "in_review",
  "status": "status",
  "updated_at": 0,
  "advertiser_phone_verification_required": true,
  "appeal": {
    "requested_at": 0,
    "resolved_at": 0,
    "status": "requested",
    "advertiser_statement": "advertiser_statement"
  },
  "geographic_targeting_blocked": true,
  "landing_page_configuration": {
    "query_string_template": "query_string_template"
  },
  "serving_issues": [
    {
      "code": "ad_account_suspended",
      "can_resolve_by_changing_countries": true
    }
  ]
}
Path Parameters
ad_id: string
Body Parameters
JSON
creative: optional object { body, title, type, 5 more }

Updated creative. Supply its required fields even for a small text change. Eligible single-image ads can switch to multiple images.

body: string

Text displayed as the ad body.

maxLength100
title: string
pattern^.*\S.*$
minLength1
maxLength50
type: "chat_card" or "product_ad_template"
One of the following:
"chat_card"
"product_ad_template"
file_id: optional string
file_ids: optional array of string

Ordered list of 4–6 distinct square images uploaded to this account for an enabled multi-image chat_card. Cannot be combined with file_id, image_crop, price or business_agent_id. On update, omit to preserve images or provide the complete replacement list.

minItems4
maxItems6
image_crop: optional object { height, width, x, y }

Optional normalized square crop for chat_card creatives. Requires file_id and is not supported for product_ad_template creatives.

height: number

Crop height as a fraction of the EXIF-oriented source image (0-1).

width: number

Crop width as a fraction of the EXIF-oriented source image (0-1).

x: number

Horizontal offset as a fraction of the EXIF-oriented source image (0-1).

y: number

Vertical offset as a fraction of the EXIF-oriented source image (0-1).

price: optional string
maxLength100
target_url: optional string
maxLength2048
landing_page_configuration: optional object { query_string_template } or null
query_string_template: optional string
maxLength2048
name: optional string

Organizational name; not displayed in the ad.

pattern^.*\S.*$
minLength3
maxLength1000
status: optional "active" or "paused" or "archived"
One of the following:
"active"
"paused"
"archived"
Returns
id: string
created_at: integer
formatunixtime
creative: object { body, target_url, title, 6 more }
body: string
target_url: string or null
title: string
type: "chat_card" or "product_ad_template"
One of the following:
"chat_card"
"product_ad_template"
file_id: optional string
image_crop: optional object { height, width, x, y }

Normalized square crop for a chat_card creative, when present.

height: number

Crop height as a fraction of the EXIF-oriented source image (0-1).

width: number

Crop width as a fraction of the EXIF-oriented source image (0-1).

x: number

Horizontal offset as a fraction of the EXIF-oriented source image (0-1).

y: number

Vertical offset as a fraction of the EXIF-oriented source image (0-1).

image_url: optional string or null
images: optional array of object { file_id, image_url, item_id }
file_id: string or null
image_url: string or null
item_id: string
price: optional string
name: string
review: object { status, reason, screenshot_url }
status: "in_review" or "rejected" or "approved"
One of the following:
"in_review"
"rejected"
"approved"
reason: optional string or "crawl_failed" or "crawler_bot_blocked" or "crawler_captcha" or 17 more
One of the following:
string
"crawl_failed" or "crawler_bot_blocked" or "crawler_captcha" or 17 more
One of the following:
"crawl_failed"
"crawler_bot_blocked"
"crawler_captcha"
"crawler_login_required"
"crawler_400"
"crawler_401"
"crawler_403"
"crawler_404"
"crawler_408"
"crawler_410"
"crawler_429"
"crawler_500"
"crawler_502"
"crawler_503"
"crawler_504"
"robots_txt"
"unsupported_content_type"
"landing_page_image_processing_failed"
"landing_page_unusable"
"missing_favicon"
screenshot_url: optional string
review_status: "in_review" or "rejected" or "approved"
One of the following:
"in_review"
"rejected"
"approved"
status: string
updated_at: integer
formatunixtime
advertiser_phone_verification_required: optional boolean
appeal: optional object { requested_at, resolved_at, status, advertiser_statement } or null
requested_at: integer
formatunixtime
resolved_at: integer or null
formatunixtime
status: "requested" or "approved" or "rejected" or 2 more
One of the following:
"requested"
"approved"
"rejected"
"superseded"
"failed"
advertiser_statement: optional string
geographic_targeting_blocked: optional boolean
landing_page_configuration: optional object { query_string_template } or null
query_string_template: string or null
serving_issues: optional array of object { code, can_resolve_by_changing_countries }
code: "ad_account_suspended" or "ad_account_brand_review_missing_favicon" or "ad_account_brand_review_escalated_review" or 25 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"
"campaign_budget_exhausted"
"ad_account_budget_exhausted"
"ad_not_active"
"review_not_approved"
"landing_page_crawl_issue"
"ad_in_review"
"ad_over_18_only"
"policy_country_targeting_blocked"
"policy_country_targeting_limited"
"title_missing"
"advertiser_name_missing"
"image_or_favicon_missing"
"target_url_invalid"
"reserved_query_params_present"
"product_feed_id_missing"
can_resolve_by_changing_countries: optional boolean
Returns Examples
200 — Example
{
  "id": "id",
  "created_at": 0,
  "creative": {
    "body": "body",
    "target_url": "target_url",
    "title": "title",
    "type": "chat_card",
    "file_id": "file_id",
    "image_crop": {
      "height": 0,
      "width": 0,
      "x": 0,
      "y": 0
    },
    "image_url": "image_url",
    "images": [
      {
        "file_id": "file_id",
        "image_url": "image_url",
        "item_id": "item_id"
      }
    ],
    "price": "price"
  },
  "name": "name",
  "review": {
    "status": "in_review",
    "reason": "crawl_failed",
    "screenshot_url": "screenshot_url"
  },
  "review_status": "in_review",
  "status": "status",
  "updated_at": 0,
  "advertiser_phone_verification_required": true,
  "appeal": {
    "requested_at": 0,
    "resolved_at": 0,
    "status": "requested",
    "advertiser_statement": "advertiser_statement"
  },
  "geographic_targeting_blocked": true,
  "landing_page_configuration": {
    "query_string_template": "query_string_template"
  },
  "serving_issues": [
    {
      "code": "ad_account_suspended",
      "can_resolve_by_changing_countries": true
    }
  ]
}