Skip to navigation

Add segment

Create a new segment in a specific list.

Authentication

AuthorizationBearer

Authorization using a Mailchimp API key (a.k.a. Bearer token)

OR
AuthorizationBearer
Authorization using OAuth

Path parameters

list_idstringRequired
The unique ID for the list.

Request

Information about a specific list segment.
namestringRequired
The name of the segment.
optionsobjectOptional

The conditions of the segment. Static and fuzzy segments don't have conditions.

static_segmentlist of stringsOptional
An array of emails to be used for a static segment. Any emails provided that are not present on the list will be ignored. Passing an empty array will create a static segment without any subscribers. This field cannot be provided with the options field.

Response

This endpoint returns an object.
created_atdatetimeOptionalRead-only
The date and time the segment was created in ISO 8601 format.
idintegerOptionalRead-only
The unique id for the segment.
list_idstringOptionalRead-only
The list id.
member_countintegerOptionalRead-only
The number of active subscribers currently included in the segment.
namestringOptional
The name of the segment.
optionsobjectOptional

The conditions of the segment. Static segments (tags) and fuzzy segments don't have conditions.

typeenumOptionalRead-only

The type of segment. Static segments are now known as tags. Learn more about tags.

Allowed values:
updated_atdatetimeOptionalRead-only
The date and time the segment was last updated in ISO 8601 format.