> ## Documentation Index
> Fetch the complete documentation index at: https://docs.markifact.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Custom Audience Users

> Add, remove, or replace OpenAI Ads custom-audience members using inline identifiers or a customer file

Add, remove, or replace OpenAI Ads custom-audience members using inline identifiers or a customer file. Returns an asynchronous operation, not completed membership. Save the operation ID and idempotency key, then poll before dependent changes.

| | |
| - | - |
| **App** | OpenAI Ads |
| **Operation ID** | `openai_ads_update_custom_audience_users` |
| **Type** | Action |
| **Connection** | `openai_ads` (required) |
| **Credits per run** | 1 |
| **Agent / MCP tool** | Yes |

## Inputs

| Field | Type | Required | Default | Description |
| - | - | - | - | - |
| `file_url` | string | No | - | UTF-8 CSV/TXT customer list, up to 500,000,000 bytes. CSV requires identifier headers: email, phone\_number, email\_sha256, phone\_number\_sha256, or gaid; TXT is one identifier per line without a header. Accepts direct URLs, Google Drive share links with sharing set to 'Anyone with the link', or files uploaded through Markifact. Uploaded automatically. Use this or file\_id, not both. |
| `file_id` | string | No | - | Previously uploaded custom-audience file ID. Use promptly. For create, also supply filename, mimetype, and file\_size. Use this or file\_url, not both. |
| `filename` | string | No | - | Original .csv or .txt filename. Required with file\_id on create; optional override with file\_url, useful for Drive links. |
| `mimetype` | string | No | - | File MIME type, normally text/csv or text/plain. Required with file\_id on create; detected for file\_url. |
| `file_size` | integer | No | - | Exact uploaded file size in bytes. Required with file\_id on create; measured automatically for file\_url. |
| `identifier_type` | enum (`email`, `phone`, `email_sha256`, `phone_number_sha256`, `gaid`) | No | - | Single-column file type: email (API default), phone, email\_sha256, phone\_number\_sha256, or gaid. Phones use E.164 including +. For SHA-256, hash UTF-8 with no trailing newline: trim/lowercase emails, or normalize phones to E.164; send hexadecimal, not Base64. Do not strip email dots/plus tags. GAIDs must be raw, not hashed. |
| `identifier_resolution` | enum (`auto`) | No | - | Use auto for a CSV containing multiple identifier columns. Omit for a single identifier type or an empty audience. |
| `audience_id` | string | Yes | - | Custom audience to update. |
| `action` | enum (`add`, `remove`, `replace`) | Yes | - | add/remove change only supplied members. replace swaps the whole membership from a file while keeping the audience ID. |
| `identifiers` | array of AudienceIdentifier or string | No | - | Inline add/remove entries or a JSON array, e.g. \[\{"identifier\_type":"email","identifier":"[customer@example.com](mailto:customer@example.com)"}]. Each entry carries its own type; use inline identifiers or a file, not both. Requests must fit 16 MiB; prefer files for bulk updates. |
| `expected_revision` | integer | No | - | Current membership\_revision from get\_custom\_audience. Required for replace; optional for add/remove. Retrieve again after a completed change. |
| `idempotency_key` | string | Yes | - | Unique key for this change. Save it with the original request; reuse only for retrying the identical action, audience, data, and revision. A replay may return the original operation without checking a changed body. |

### AudienceIdentifier

| Field | Type | Required | Default | Description |
| - | - | - | - | - |
| `identifier_type` | enum (`email`, `phone`, `email_sha256`, `phone_number_sha256`, `gaid`) | Yes | - | email, phone, email\_sha256, phone\_number\_sha256, or gaid. |
| `identifier` | string | Yes | - | Customer identifier or normalized SHA-256 hash, according to identifier\_type. OpenAI accepts raw email and phone values; do not label raw values as hashes. |

## Output

**Type**: `Dict`

Native OpenAI Ads audience or membership-operation response. Membership status processing is not completion; retain returned IDs for follow-up.

**Fields**: dynamic (depend on the inputs)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.