Patch Audience
patch_audienceRename, archive/restore, or change the composition of an existing audience. Also supports adding/removing included or excluded segments. set_logic must be "union" or "intersection" — never "exclusion". To exclude records, use add_excluded_segment_id. Requires 'creator' scope.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | New display name for the audience | |
| status | No | Status transition: active once ready, archived to hide from the default list; active restores it | |
| set_logic | No | Change inclusion logic: "union" (OR) or "intersection" (AND) | |
| audience_id | Yes | The audience ID returned by create_audience or list_audiences | |
| add_segment_id | No | Segment ID to append to the included list | |
| remove_segment_id | No | Segment ID to remove from the included list | |
| add_excluded_segment_id | No | Segment ID to add as an exclusion — records matching this segment are subtracted from the audience | |
| remove_excluded_segment_id | No | Excluded segment ID to stop excluding |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | Yes | ||
| guidance | No | Interpretation or recovery guidance for this result | |
| count_unit | No | ||
| page_count | No | Number of objects on this page, not the organization total | |
| audience_id | Yes | ||
| count_state | No | Unknown means no count; available does not guarantee freshness. Recount for a current value. | |
| next_actions | No | Suggested next calls using returned IDs and available scopes. Not executed and not user consent. | |
| money_display | No | Currency amounts formatted once from source paths ending in _cents. Use verbatim; do not divide again. Null/missing source amounts are omitted, not zero. | |
| population_input | No | Population input used for the preview; IDs refer to their current saved definitions |