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