Create a segment
create_segmentSaves a segment: contacts matching rules on contact fields. Newsletters, journeys and messages can then target it. This action saves the rules without sending messages.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| rules | Yes | Conditions on contact fields. mode "all" or "any"; each rule is { field, operator, value }. Fields: contact.name, contact.email, contact.consent (subscribed | unknown | unsubscribed), contact.email_status, contact.product_id, contact.created_at, contact.last_seen_at, contact.attributes.<field> (tags are contact.attributes.tags), contact.events.<event>. Operators: is, is_not, contains, not_contains, gt, lt, exists, missing, before, after (dates are ISO or now-7d). |