account | array (also accepts a comma-separated string) | No | - | The GA4 property to change. Only one property at a time. |
action | string or SelectableOption | Yes | - | ‘create’ builds a new audience from filter clauses; ‘update’ changes the display name or description of an existing audience (its filters and membership duration are fixed by Google after creation); ‘archive’ retires it (audiences cannot be deleted or unarchived). Options: ‘create’, ‘update’, ‘archive’. |
audience_id | string | No | - | Numeric id of the audience to update or archive, e.g. ‘6636293497’. Read ids from ga4_get_property_settings with setting ‘audiences’. |
display_name | string | No | - | Audience name shown in GA4 and Google Ads. Required on create. |
description | string | No | - | Audience description. Required by Google on create. |
membership_duration_days | integer | No | - | How many days a user stays in the audience after qualifying, 1 to 540. Required on create and fixed afterwards. |
exclusion_duration_mode | string or SelectableOption | No | - | Only when a clause has clause_type EXCLUDE: ‘EXCLUDE_TEMPORARILY’ removes users while they match the exclusion, ‘EXCLUDE_PERMANENTLY’ removes them for good. Fixed after creation. |
filter_clauses | array of object or string | No | - | Audience definition as the Admin API filterClauses array (object or JSON string), sent to Google as-is and validated by Google. Each clause has clauseType INCLUDE or EXCLUDE and either simpleFilter {scope, filterExpression} or sequenceFilter. Google requires the top-level filterExpression to be an andGroup whose children are orGroups; the filters (eventFilter, dimensionOrMetricFilter, notExpression) go inside the orGroup. Example, users who purchased: [{“clauseType”:“INCLUDE”,“simpleFilter”:{“scope”:“AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS”,“filterExpression”:{“andGroup”:{“filterExpressions”:[{“orGroup”:{“filterExpressions”:[{“eventFilter”:{“eventName”:“purchase”}}]}}]}}}}]. Dimension and metric filters use dimensionOrMetricFilter with fieldName (e.g. ‘country’, ‘customUser:plan’) and stringFilter, inListFilter, numericFilter or betweenFilter. Required on create, fixed afterwards. |
event_trigger | object or string | No | - | Optional event to log when a user joins the audience, as the Admin API eventTrigger object: {“eventName”:“joined_vip”,“logCondition”:“AUDIENCE_JOINED”} (or “AUDIENCE_MEMBERSHIP_RENEWED”). Fixed after creation. |