Create and manage segments within lists. A segment is a dynamic filter that defines a subset of contacts based on query criteria. Segments can be defined using SQL-like expressions, FIQL, or JSON query format. Segments are used to target specific audiences when sending campaigns.
Show all segments
List all segments defined for a list. Each segment includes its query definition, the number of campaigns using it, and when it was last used.
Required scope(s): segments:read
path Parameters
list_idquery Parameters
account_idOptional Account ID to be used for the request
Optional Account ID to be used for the request
pageper_pagewith_countInclude count in the response
Include count in the response
sortSort term and direction, using syntax [-|+]term.
Valid terms:
idnamecreated_on
Sort term and direction, using syntax [-|+]term.
Valid terms:
idnamecreated_on
Show all segments › Responses
Successful Response
List of segments
Create a segment
Create a new segment for a list. The segment query can be defined using one of three formats: SQL-like expression, FIQL, or JSON. Exactly one format must be provided.
Required scope(s): segments:write
path Parameters
list_idquery Parameters
account_idOptional Account ID to be used for the request
Optional Account ID to be used for the request
Create a segment › Request Body
namequerySQL-like expression (use one of query, fiql and json)
fiqlFIQL expression (use one of query, fiql and json)
jsonJSON expression (use one of query, fiql and json)
Create a segment › Responses
Successful Response
idSegment id
objectObject type
createdWhether the segment was created
Show a segment details
Retrieve the full details of a segment, including its query definition in all available formats (SQL-like, FIQL, and JSON).
Required scope(s): segments:read
path Parameters
list_idsegment_idquery Parameters
account_idOptional Account ID to be used for the request
Optional Account ID to be used for the request
Show a segment details › Responses
Successful Response
Delete a segment
Delete a segment. Campaigns that were using this segment will no longer have a segment filter applied.
Required scope(s): segments:delete
path Parameters
list_idsegment_idquery Parameters
account_idOptional Account ID to be used for the request
Optional Account ID to be used for the request
Delete a segment › Responses
Successful Response
idSegment id
objectObject type
deletedWhether the segment was deleted
Update a segment
Update a segment's name or query. All fields are optional — only provided fields are updated. At most one query format can be provided.
Required scope(s): segments:write
path Parameters
list_idsegment_idquery Parameters
account_idOptional Account ID to be used for the request
Optional Account ID to be used for the request
Update a segment › Request Body
querySQL-like expression (use one of query, fiql and json)
fiqlFIQL expression (use one of query, fiql and json)
jsonJSON expression (use one of query, fiql and json)
nameSegment Name
Update a segment › Responses
Successful Response
idSegment id
objectObject type
updatedWhether the segment was updated