Actions138
- Account Actions
- Contact Actions
- List Actions
- Campaign Actions
- Webhook Actions
- Segment Actions
- Report Actions
- Email Actions
- Custom Attribute Actions
- Sender Actions
- Template Actions
- Sub-Account Actions
- Log Actions
- User Actions
- Domain Actions
- DKIM Actions
- Form Actions
- Token Actions
- Interest Actions
- Tags Actions
- Suppressed Email Actions
- Links Actions
Segment → Create
AI-generatedSummary
Create a segment to organize contacts based on specified conditions.
Inputs
- accountId — Optional: Specify an account ID for multi-tenant operations. If not provided, uses the authenticated account.
- listId (required) — The ID of the list.
- segmentName (required) — The name of the segment.
- segmentConditions (required) — Segment conditions as a JSON object. Example: {"operator": "AND", "rules": [{"field": "email", "operator": "contains", "value": "@example.com"}]}.
- segmentAdditionalFields — Additional fields such as description of the segment.
Output shape
a confirmation object including the created segment's details
Returns the created segment's details including its ID and name. Ensure that the conditions provided in JSON format are valid.
Examples
Example 1: Create a segment for users with emails containing '@example.com'
With listId set to 123 and conditions specifying the email filter.