Create a segment

Creates a segment and returns it with 201. Names are unique in the account, letter case aside. Rules are checked
against the account (properties, lists, tags) so a rule can't be quietly ignored when the segment is used.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

The body of POST /v2/segments.

string
required
length between 1 and 200
rules
array of objects
required
length between 1 and 50
rules*

One condition of a segment. Which operators and values a rule takes depends on field:
quality and status appear only in segments made in the Dashboard before; they can't be used in new rules.

string
enum
Allowed:
string
enum
required
int64 | null

The contact property, when field is property.

string
enum
required
string | null

What to compare with; not used by is_empty and is_not_empty.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
application/problem+json