Skip to main content
POST

Authorizations

Authorization
string
header
required

Your Mailercloud API key (plain text, no Bearer prefix). Create keys in Settings → API.

Headers

Content-Type
string
default:application/json
required

Request body type

Body

application/json
name
string
required

Segment display name. Must be unique within the account.

Minimum: 1 Maximum: 100

Required string length: 1 - 100
match
enum<string>
required

How rules combine.

all: every rule must match (AND) any: at least one rule must match (OR)

Supported values: all, any

Available options:
all,
any
rules
object[]
required

Filter rules. At least one rule is required.

Minimum array length: 1
lists
string[]

Optional. Restrict the segment to contacts in these lists. Provide list names (cid-scoped). Maximum 150 lists.

Maximum array length: 150

Response

Created

The response is of type object.