meta_ads_audiences_create
Create a Custom Audience in Meta Ads to target website visitors, customer lists, or app users. Define audience rules, retention, and data source. Returns audience ID for ad campaigns.
Instructions
Creates a Custom Audience in a Meta Ads account. Returns the new audience_id. Mutating, reversible via rollback_apply (rollback deletes the audience). Subtype controls the data source: WEBSITE audiences require a pixel_id and an event rule; CUSTOM audiences accept a manually supplied rule or a customer list upload (the upload path is handled out-of-band by Meta). For similarity-expanded reach use meta_ads_audiences_create_lookalike on top of this audience.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account_id | No | Meta Ads account ID in the format 'act_XXXXXXXXXX' (e.g. 'act_1234567890'). Optional — falls back to META_ADS_ACCOUNT_ID from the configured credentials. The leading 'act_' prefix is required. | |
| name | Yes | Audience name shown in Ads Manager. Must be unique within the account. | |
| subtype | No | Audience type hint. WEBSITE auto-generates a PageView rule from the linked pixel when `rule` is omitted; CUSTOM requires an explicit rule or a customer-list upload; APP requires an app_id. Default CUSTOM when omitted. | |
| description | No | Optional free-text description stored with the audience. Not visible to end users. | |
| retention_days | No | How long a matched user stays in the audience after their last qualifying event. Default 30. Meta caps at 180 days. | |
| pixel_id | No | Meta Pixel ID to source events from. Required for subtype=WEBSITE. Find via meta_ads.pixels.list. | |
| rule | No | Audience rule definition (Meta rule JSON schema). When omitted with subtype=WEBSITE, a default PageView rule scoped to the supplied pixel is auto-generated. See Meta Marketing API docs for rule syntax — supports url filters, event parameters, and compound boolean operators. | |
| customer_file_source | No | Source declaration required by Meta for compliance. USER_PROVIDED_ONLY (default) — data came from the advertiser's own first-party sources; PARTNER — from a data provider; BOTH — mixed. Meta uses this to set legal-basis defaults. |