Skip to main content
Users
Developers
CloudPortalLogin
  • Powered byPowered by
Introduction to the Sitecore Send API
Getting started with the Sitecore Send API
API reference
  • Sitecore Send API documentation
  • API reference
  • Segments
  • Create an empty segment

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:

  • All (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:

  • All - 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:Top or percentage for FetchType:TopPercent of members to be contained in the created segment. If not specified, 0 is assumed.

RequestResponse
POST https://{hostname}/v3/lists/{MailingListID}/segments/create.{Format}?apikey=

Request body:
{
  "Name": "New Customers",
  "MatchType": "All",
  "FetchType": "Top",
  "FetchValue": "200"
}

Response

Status

Description

Headers

Schema

200 OK

The request is successful.

Content-Type:application/json

Accept:application/json

N/A

RequestResponse
{
  "Code": 0,
  "Error": null,
  "Context": 10199
}
  • Code - the response code. This is 0 if successful.

  • Error - the response error message. This is null if successful.

  • Context - the ID of the segment created.

Do you have some feedback for us?

If you have suggestions for improving this article,

Privacy policySitecore Trust CenterCopyright © 1999-2026 Sitecore