Partially update an automation workflow. Only the fields provided in the request body are updated.
Enabled automations cannot be patched. Disable the automation via
POST /automations/{id}/disable, make changes, then re-enable via
POST /automations/{id}/enable when ready. When disabling, contactsInWorkflow
controls whether contacts already in the workflow continue through the remaining
blocks (keep) or exit immediately (exit). Enable/disable state is controlled
exclusively via the /automations/{id}/enable and /automations/{id}/disable
endpoints.
trigger sub-fields (condition, audienceFilterGroup, inactivitySettings) are patched
individually — each provided sub-field replaces the corresponding sub-field in full.
exitConditions are replaced in full when provided. blocks are patched individually.
Scopes:
automations.write
Audience filter group examples
The trigger.audienceFilterGroup field in PATCH requests replaces the existing audience filter group in full (or sets it for the first time). Omit it to leave the existing audience filter group unchanged.
Supported fields
| Field | Operators | Value shape |
|---|---|---|
segmentID | eq, neq | Segment ID string, e.g. "000000000000000000000001" |
tag | eq, neq | Tag name, e.g. "vip" |
dateAdded | eq, neq, gt, lt | ISO-8601 date, e.g. "2025-03-15" |
firstName | eq, neq, contains, notContains | Free string, e.g. "John" |
lastName | eq, neq, contains, notContains | Free string, e.g. "Smith" |
gender | eq | "m" or "f" |
country | eq, neq, contains, notContains | ISO-2 country code, e.g. "US" |
state | eq, neq, contains, notContains | State / region name, e.g. "California" |
city | eq, neq, contains, notContains | City name, e.g. "New York" |
postalCode | eq, neq, contains, notContains | Postal code string, e.g. "10001" |
Where it fits
audienceFilterGroup sits inside trigger in the PATCH request body, alongside condition and inactivitySettings:
{
"trigger": {
"audienceFilterGroup": { ... }
}
}
Each example below shows only the audienceFilterGroup value — slot it into the skeleton above.
Replace audience filter without touching trigger event or blocks
{
"logicalOperator": "or",
"filters": [
{"field": "tag", "operator": "eq", "value": "vip"},
{"field": "tag", "operator": "eq", "value": "beta"}
]
}
Narrow to US women
{
"logicalOperator": "and",
"filters": [
{"field": "country", "operator": "eq", "value": "US"},
{"field": "gender", "operator": "eq", "value": "f"}
]
}
Swap a segment-based audience for a tag-based one
{
"logicalOperator": "and",
"filters": [
{"field": "tag", "operator": "eq", "value": "vip"},
{"field": "tag", "operator": "neq", "value": "beta-churned"}
]
}