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

Merge Custom Audiences

POST
/custom_audiences/merge

Create an independent custom audience containing all matched source members.

Merge Custom Audiences

curl https://api.ads.openai.com/v1/custom_audiences/merge \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $OPENAI_ADS_API_KEY" \
    -d '{
          "custom_audience_ids": [
            "string"
          ],
          "name": "xxx"
        }'
200 — Example
{
  "custom_audience_id": "custom_audience_id",
  "operation": "operation",
  "operation_id": "operation_id",
  "status": "status",
  "failure_reason": {
    "code": "code",
    "message": "message"
  }
}
Header Parameters
"Idempotency-Key": string
pattern.*\S.*
minLength1
maxLength255
Body Parameters
JSON
custom_audience_ids: array of string
maxItems64
name: string
pattern^.*\S.*$
minLength3
maxLength1000
Returns
custom_audience_id: string
operation: string
operation_id: string
status: string
failure_reason: optional object { code, message }

Present only for failed operations with a known advertiser-actionable cause. Omitted for other failures and operations recorded without a failure reason.

code: string

Stable code for an advertiser-actionable failure.

message: string

Safe explanation and suggested corrective action.

Returns Examples
200 — Example
{
  "custom_audience_id": "custom_audience_id",
  "operation": "operation",
  "operation_id": "operation_id",
  "status": "status",
  "failure_reason": {
    "code": "code",
    "message": "message"
  }
}