Create Segment
POST {{baseUrl}}/segments
This API creates a segment.
Note: Segment definitions may take time to propagate to all identities. A token with ORG_ADMIN or API authority is required to call this API.
Request Body
{"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}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: Created
{"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}