cURL
curl --request PUT \ --url http://localhost/api/admin/segments/ \ --header 'Authorization: <api-key>' \ --header 'Content-Type: application/json' \ --data ' { "workspaceId": "<string>", "name": "<string>", "id": "<string>", "definition": { "entryNode": { "type": "Trait", "id": "<string>", "path": "<string>", "operator": { "type": "Within", "windowSeconds": 123 } }, "nodes": [ { "type": "Trait", "id": "<string>", "path": "<string>", "operator": { "type": "Within", "windowSeconds": 123 } } ] }, "subscriptionGroupId": "<string>", "updatedAt": 123, "lastRecomputed": 123 } '
{ "id": "<string>", "workspaceId": "<string>", "name": "<string>", "definition": { "entryNode": { "type": "Trait", "id": "<string>", "path": "<string>", "operator": { "type": "Within", "windowSeconds": 123 } }, "nodes": [ { "type": "Trait", "id": "<string>", "path": "<string>", "operator": { "type": "Within", "windowSeconds": 123 } } ] }, "updatedAt": 123, "createdAt": 123, "definitionUpdatedAt": 123, "subscriptionGroupId": "<string>", "lastRecomputed": 123 }
Create or update a user segment.
Show child attributes
Default Response