Skip to main content
POST
Update 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.

Path Parameters

segment_id
string
required

Public segment ID.

Pattern: ^seg_[A-Za-z0-9_-]+$

Body

application/json

Send at least one field. match only goes together with conditions; without match, the conditions use all.

name
string
Required string length: 1 - 200
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
conditions
object[]

The full new list of conditions, not just what changed. Only for filter segments.

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}.

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 updated.

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