API reference / Customers
Change a segment of customers
Changes the name, the rules or who sees a segment. Send only what changes. Owners and admins, and whoever made the segment.
/api/v1/customer-segments/{id}Other ways to call it
troopy customers segment-setPath parameters
id*stringA 24-character id
Body
application/jsonnamestringAt least 1 characters · At most 60 characters
rulesarray<object>At most 6 items
3 properties
field*enum<string>statusplanriskpayingactivatedsteadychannelsourcecountrytrait
keystringFor trait: the name of the trait
values*array<string>The customer has one of these values. For paying, activated and steady: yes or no
At most 20 items
sharedbooleanResponse
200 · application/jsondata*object7 properties
id*stringA 24-character id
name*stringrules*array<object>A customer is in the segment when every rule is true for it
3 properties
field*enum<string>statusplanriskpayingactivatedsteadychannelsourcecountrytrait
keystringFor trait: the name of the trait
values*array<string>The customer has one of these values. For paying, activated and steady: yes or no
At most 20 items
shared*booleantrue: everyone in the workspace sees it. false: only the person who made it
by*objectWho made it
2 properties
type*stringname*string | nullcustomers*integerThe customers in the segment now
createdAt*stringISO 8601 date and time