Create an empty segment
POST /lists/{MailingListID}/segments/create.{Format}
Creates a new empty segment without criteria in a specific email list.
Request
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| Accept | header | string | true | Determines the expected format and data type to retrieve the response data.Value: application/json |
| MailingListID | path | string | true | The ID of the email list where the segment is created. |
| Format | path | string | true | The supported file format for getting a response.Possible values: json and xml. |
| apikey | query | string | true | The API key of your account. |
| Name | body | string | true | The name of the segment. |
| MatchType | body | string | false | Specifies how subscribers are returned by your segment based on matching criteria (Default) - returns subscribers that match all the given criteria.Any - returns subscribers that match any of the given criteria. |
| FetchType | body | string | false | Specifies how many criteria-matching subscribers are contained in your segment - returns all criteria matching subscribers.Top - returns only a maximum number of subscribers defined in FetchValue.TopPercent - returns only a percentage of subscribers defined in FetchValue. |
| FetchValue | body | integer | false | Specifies the maximum number for FetchType or percentage for FetchType of members to be contained in the created segment. If not specified, 0 is assumed. |
http
curl
Response
| Status | Description | Headers | Schema |
|---|---|---|---|
| 200 OK | The request is successful. | Content-Type/jsonAccept/json | N/A |
json
-
Code- the response code. This is0if successful. -
Error- the response error message. This isnullif successful. -
Context- the ID of the segment created.
If you have suggestions for improving this article, let us know!