segments:read and/or segments:write and the public segment ID. Supported actions include list, create, show, update, preview, evaluate, versions, usage, publish, and archive.1234567891011121314{ "segment": { "name": "Subscribed customers in Lagos", "purpose": "marketing", "source": {"type": "all"}, "rules": { "logic": "and", "rules": [ {"field": "city", "operator": "equals", "value": "Lagos"}, {"field": "consent.email", "operator": "is_true"} ] } } }
POST /api/v1/segments/preview, then poll GET /api/v1/segments/preview?evaluation_id=sev_... until completed or failed. Publish: POST /api/v1/segments/:public_id/publish with the reviewed version_id and purpose_confirmed.