Skip to main content
POST
Save Campaign Audience as Segment
Turn a campaign’s audience filters and include/exclude rules into a saved dynamic segment you can reuse in future campaigns, sequences, and analytics. Unlike creating a segment on emailSent for the campaign (which references the fixed group of contacts who received it), this endpoint copies the campaign’s underlying audience rules into a live segment so new matching contacts join automatically.
This endpoint refuses trivial audiences (all active subscribers, a single list, or a single existing segment) and exclusion rules whose operators cannot be inverted losslessly. Manual contact additions and removals are not carried into the segment; omitsManualAdjustments is true when the campaign had them.
Requires API key scopes campaigns:read and segments:write.

Request

string
required
Campaign ID.
string
Name for the new segment (unique per company, up to 255 characters). Defaults to <campaign name> audience when the campaign has a title.
string
Optional description saved on the segment.

Response fields

string
ID of the source campaign.
object
The created segment record (id, name, filters, filterJoinOperator, format, and root when the segment uses nested groups, event filters, or segment references).
boolean
True when the campaign had hand-picked manual additions or removals that were not carried into the dynamic segment.
boolean
True when the campaign’s resend non-opener exclusions were converted into emailOpened is_not conditions on the segment.
array
Optional warnings when a custom attribute filter references an attribute name that ClickHouse has not synced yet.

Responses