For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create a List Segment

Create a new list segment using custom field conditions, campaign behavior filters, or both. Ideal for targeting subscribers with highly specific criteria for campaigns or automation workflows.

βž• Create a List Segment

Create a new segment for a subscriber list based on field conditions, campaign behavior, or a combination of both.

πŸ”Ή HTTP Request

POST API-URL/lists/LIST-UNIQUE-ID/segments

πŸ”Έ URL Segments

Segment
Required
Description

LIST-UNIQUE-ID

Yes

Unique identifier of the list.

πŸ” Authorization Header

X-API-KEY: your-api-key-here

πŸ“ POST Parameters

Parameter
Type
Required
Description

data

array

Yes

List segment details including name, operator_match, conditions, and campaign_conditions.


πŸ“¦ General Block (Required)

Parameter
Type
Required
Description

name

string

Yes

Name of the list segment.

operator_match

string

Yes

Match operator: any or all.


πŸ“¦ Conditions Block (Optional)

Parameter
Type
Required
Description

field_id

string

Yes

ID of the custom field (use Get List Fields API).

operator_id

string

Yes

Condition operator ID (use condition operators API).

value

string

Yes

Value to compare against.


πŸ“¦ Campaign Conditions Block (Optional)

Parameter
Type
Required
Description

action

string

Yes

Action to filter by: click or open.

campaign_id

integer

Yes

Campaign ID to check behavior against.

time_comparison_operator

string

Yes

Time operator: lte, lt, gte, gt, eq.

time_value

integer

Yes

Time value for comparison.

time_unit

string

Yes

Time unit: day, month, or year.


πŸ’» PHP Example


πŸ“¦ Sample JSON Response


Last updated