OpenAI Ads API: Automating Campaigns, Ad Groups, and Reporting
What the OpenAI Ads API Covers
The OpenAI Ads API - the Advertiser API, in OpenAI's own naming - turns the Ads Manager workflows into programmable endpoints. It supports CRUD-like operations over campaigns, ad groups, ads, files, and reporting with standard JSON content types, plus a conversions endpoint group for measurement setup. Requests go to https://api.ads.openai.com/v1, and the account context comes from the key itself: every resource the key touches belongs to the ad account associated with that key. For teams that already automated Meta or Google, the shape is familiar enough to plan against, with the specifics living in a handful of differences this article walks through.
Keys: One Key, One Ad Account
Key issuance happens in the Settings tab of Ads Manager, not in a developer portal. Each key is scoped to one ad account - there is no umbrella key across accounts - and every request authenticates with a bearer header:
Authorization: Bearer $OPENAI_ADS_API_KEYOpenAI's own partner documentation stores the key in the OPENAI_ADS_API_KEY environment variable and recommends a server-side secret manager for it, alongside any Conversions API keys the integration creates. The name overlap is worth defusing early: this key belongs to the ads platform and is separate from OpenAI platform API keys used for models - different system, different credential, different blast radius.
The Endpoint Map
The endpoint groups map one-to-one onto the objects from the standard events and campaign articles. Campaigns, ad groups, and ads support create, list, retrieve, update, and state changes under the /v1 root - campaigns live at /v1/campaigns - with an Idempotency-Key header available on creates so retries do not duplicate objects. The files endpoint uploads remote images or binary assets and returns a file ID that creatives reference. Insights retrieves aggregated performance across ad account, campaign, ad group, and ad scopes, including segmented metrics such as product, country, or device breakdowns. The bulk API creates or updates campaigns, ad groups, and ads as an asynchronous job - the programmatic equivalent of the bulk upload spreadsheet in the UI. Finally, the conversions group provisions pixels, server-side keys, and conversion event settings for the conversions API when those operations are enabled for the account.
Automation Boundaries: What Stays in Ads Manager
Three boundaries keep automation plans honest. First, product feed management does not exist in the public API: creating feed connections, listing linked feeds, and uploading catalogs happen in the Feeds area of Ads Manager, with the Delta Feeds API as the only programmatic touchpoint for ongoing price and availability updates. Second, the API's campaign budget field is lifetime_spend_limit_micros - minimum 1,000,000 micros - while the Ads Manager UI offers daily budgets as well - a UI/API divergence to respect when tooling reads budgets back. Third, several operations - brand updates, pixel management, conversions key creation, conversion-optimized campaigns - must be enabled for the account; a 403 or a 404 Not found on those endpoints is the enablement cue, not a bug in your request.
Partner Setup: Managing Client Accounts
For agencies and tool vendors, OpenAI's API partner setup describes the working pattern: configure measurement and campaign resources for client accounts using the key associated with each client's ad account - the one-key-one-account rule means there is no partner-level override. The documented prerequisites are an Ads API key for the client ad account, access to the client's website and brand assets, and a server-side secret manager for the Ads API key plus any Conversions API keys created during setup. When brand updates return 403, or the conversions pixels and keys endpoints answer 404 Not found, the enablement conversation belongs with the OpenAI partner representative - the same account-enablement gate as in the previous section, seen from the agency side.
A Minimal Automation Loop
A first automation loop needs nothing exotic. Create the campaign with status: paused, attach ad groups with their context hints, attach ads referencing uploaded file IDs, and leave validation time for the conversion setup that oCPC campaigns depend on. Switch the campaign to active only after the measurement chain is confirmed - the attribution mechanics decide whether the spend teaches anything - and pull results from the insights endpoints rather than screenscraping the UI. MOST operates this loop for tracked conversion delivery server-side, and the free Pixel Activator validates one event per landing at pixel.way2.us before automation takes over the recurring flow.
