Skip to main content
POST
Create filter segment

Authorizations

Authorization
string
header
required

API key created in the organization settings.

Headers

Idempotency-Key
string

Unique key for the operation. Repeating the same key with the same body returns the original response instead of running it again.

Body

application/json
name
string
required

Segment name. If it is already taken, Bevits adds a number at the end.

Required string length: 1 - 200
conditions
object[]
required

Conditions from the filter catalog (GET /v1/segment-builder/catalog). Up to 30.

Required array length: 1 - 30 elements

One condition of a filter segment. The same format goes into create, update, and preview and comes back in GET /v1/segments/{segment_id}.

description
string
Maximum string length: 1000
match
enum<string>

all: customers who match every condition. any: customers who match at least one.

Available options:
all,
any
operation_id
string

Optional unique id for this call, such as a UUID. Reuse the same value only to retry the same call: the retry returns the first result instead of creating again. The same value with a different body is rejected with 409.

Required string length: 8 - 128

Response

Segment created.

object
string
required
Allowed value: "segment_write"
segment
object
required
next_step
string
required