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 Custom Audience

POST
/custom_audiences

Create a custom audience from an uploaded file, or without a file when small audiences are enabled for the account. Processing and publication are asynchronous.

Create Custom Audience

curl https://api.ads.openai.com/v1/custom_audiences \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $OPENAI_ADS_API_KEY" \
    -d '{
          "name": "xxx"
        }'
200 — Example
{
  "id": "id",
  "created_at": 0,
  "description": "description",
  "hash_spec_version": "hash_spec_version",
  "invalid_identifier_count_range": "invalid_identifier_count_range",
  "matched_identifier_count_range": "matched_identifier_count_range",
  "matched_user_count_range": "matched_user_count_range",
  "name": "name",
  "status": "status",
  "updated_at": 0,
  "uploaded_identifier_count_range": "uploaded_identifier_count_range",
  "membership_revision": 0
}
Body Parameters
JSON
name: string
pattern^.*\S.*$
minLength3
maxLength1000
description: optional string
file_id: optional string

Uploaded file ID. Omit all file fields to create an empty audience when small audiences are enabled for the account.

file_size: optional integer
minimum1
maximum500000000
filename: optional string
minLength1
maxLength255
identifier_resolution: optional "auto"
identifier_type: optional "email" or "phone" or "email_sha256" or 2 more
One of the following:
"email"
"phone"
"email_sha256"
"phone_number_sha256"
"gaid"
mimetype: optional string
minLength1
maxLength255
Returns
id: string
created_at: integer
formatunixtime
description: string or null
hash_spec_version: string
invalid_identifier_count_range: string
matched_identifier_count_range: string
matched_user_count_range: string
name: string
status: string
updated_at: integer
formatunixtime
uploaded_identifier_count_range: string
membership_revision: optional integer
Returns Examples
200 — Example
{
  "id": "id",
  "created_at": 0,
  "description": "description",
  "hash_spec_version": "hash_spec_version",
  "invalid_identifier_count_range": "invalid_identifier_count_range",
  "matched_identifier_count_range": "matched_identifier_count_range",
  "matched_user_count_range": "matched_user_count_range",
  "name": "name",
  "status": "status",
  "updated_at": 0,
  "uploaded_identifier_count_range": "uploaded_identifier_count_range",
  "membership_revision": 0
}