POST
cURL
Saves rules as a segment of a contact book, for campaigns to send to.
Needs an API key with full access.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

contactBookId
string
required
Minimum string length: 1
Example:

"clx1234567890"

Body

application/json
name
string
required
Required string length: 1 - 100
match
enum<string>
required
Available options:
ALL,
ANY
rules
object[]
required
Maximum array length: 20

Response

The new segment

id
string
required
contactBookId
string
required
name
string
required
match
enum<string>
required

ALL: a contact must match every rule. ANY: one rule is enough.

Available options:
ALL,
ANY
rules
object[]
required
createdAt
string
required
updatedAt
string
required
_count
object

How many campaigns use the segment (list only)