Update Segment
PATCH {{baseUrl}}/segments/:id
Use this API to update segment fields by using the JSON Patch standard.
Note: Changes to a segment may take some time to propagate to all identities. A token with ORG_ADMIN or API authority is required to call this API.
Request Body
{"0"=>{"op"=>"replace", "path"=>"/visibilityCriteria", "value"=>{"expression"=>{"operator"=>"AND", "children"=>[{"operator"=>"EQUALS", "attribute"=>"location", "value"=>{"type"=>"STRING", "value"=>"Philadelphia"}}, {"operator"=>"EQUALS", "attribute"=>"department", "value"=>{"type"=>"STRING", "value"=>"HR"}}]}}}}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"id":"0f11f2a4-7c94-4bf3-a2bd-742580fe3bde","name":"segment-xyz","created":"2020-01-01T00:00:00.000000Z","modified":"2020-01-01T00:00:00.000000Z","description":"This segment represents xyz","owner":{"type":"IDENTITY","id":"2c9180a46faadee4016fb4e018c20639","name":"support"},"visibilityCriteria":{"expression":{"operator":"EQUALS","attribute":"location","value":{"type":"STRING","value":"Austin"}}},"active":true}