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 Conversion Source

POST
/conversions/pixels

Create a web conversion source and its Pixel ID.

Use id as a source_ids value when you create an event setting. Use pixel_id to initialize the JavaScript Pixel and when you send Conversions API events. Web pixels created by this endpoint automatically use automatic advanced matching.

Create Conversion Source

curl https://api.ads.openai.com/v1/conversions/pixels \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $OPENAI_ADS_API_KEY" \
    -d '{
          "client_type": "web",
          "name": "xxx"
        }'
200 — Example
{
  "id": "id",
  "client_type": "client_type",
  "name": "name",
  "pixel_id": "pixel_id"
}
Body Parameters
JSON
client_type: "web"
name: string
pattern^.*\S.*$
minLength3
maxLength1000
Returns
id: string
client_type: string
name: string
pixel_id: string
Returns Examples
200 — Example
{
  "id": "id",
  "client_type": "client_type",
  "name": "name",
  "pixel_id": "pixel_id"
}