create_chatgpt_custom_audience

ChatGPT Ads Write

Create a custom audience — empty (add members after) or seeded from an uploaded file_id

Endpoint

POST https://api.adspirer.ai/api/v1/tools/create_chatgpt_custom_audience/execute

Headers

Description

Create a custom audience — empty (add members after) or seeded from an uploaded file_id. Processing is asynchronous; poll get_chatgpt_custom_audience until 'ready'. Include-targeting and bid multipliers need ~25k+ matched users; exclusion has no minimum.

Request body

All tool arguments are wrapped in an arguments object.

FieldTypeDescription
namestring requiredAudience name (≥3 chars).
descriptionstring optionalOptional description.
file_idstring optionalAn uploaded file id (from upload_chatgpt_custom_audience_file) to seed the audience. Omit to create an empty audience and add members later.
identifier_typestring optionalFor a single-type file: 'email', 'phone', 'email_sha256', 'phone_number_sha256', or 'gaid'. Defaults to 'email'.
identifier_resolutionstring optionalSet 'auto' when a CSV mixes identifier types.
filenamestring optionalThe file's name (must end .csv or .txt) — required with file_id.
mimetypestring optional'text/csv' or 'text/plain' — required with file_id.
file_sizeinteger optionalFile size in bytes (1–500,000,000) — required with file_id.

Example request

{
  "arguments": {
    "name": "string",
    "description": "string",
    "file_id": "string",
    "identifier_type": "string",
    "identifier_resolution": "string",
    "filename": "string",
    "mimetype": "string"
  }
}

Example responses

200 — Success

{
  "success": true,
  "data": {
    "text": "(tool-specific textual output for create_chatgpt_custom_audience)",
    "quota": {
      "used": 42,
      "limit": 150,
      "tier": "plus",
      "period_end": "2026-05-01"
    }
  },
  "tool": "create_chatgpt_custom_audience"
}

400 — Tool-level error (bad arguments / multi-account selection)

{
  "success": false,
  "error": "You have 25 meta_ads accounts connected. Please specify which account to use by passing the ad_account_id parameter:\n  - Acme Holdings (ad_account_id=\"act_123456789\")\n  - Acme EU (ad_account_id=\"act_987654321\")",
  "is_error": true,
  "tool": "create_chatgpt_custom_audience"
}

402 — Quota exhausted

{
  "success": false,
  "error": "\ud83d\udea8 Monthly limit reached (150/150 tool calls on Plus tier).\nUpgrade to Pro at https://adspirer.ai to keep building.",
  "is_error": true,
  "tool": "create_chatgpt_custom_audience",
  "quota": {
    "used": 150,
    "limit": 150,
    "tier": "plus",
    "period_end": "2026-05-01",
    "upgrade_url": "https://adspirer.ai"
  }
}

Try it live


Adspirer REST API — get an API key at adspirer.ai/keys · adspirer.ai