RE: How to create a segment using API
Hello,
We are working on a dedicated API for Segment management that will allow to control the Segment lifecycle.
At the moment it is not possible to control via API whether a Segment is life or not. As you have found out already you can already create and modify the data of a Segments that are captured in CRM. But we are missing the capability of going live with those changes.
For Static segments the list of members is maintained in a field in the segment entity. Also the Query of a Compound or Dynamic segment is maintained as fields on the Segment entity. But again we are missing capabilities of composing the query, validating and controlling the lifecycle of the segment.
This said, it is possible today to generate segments via API code and then leave it to users in the UI to go live with those segments.
The first release of the segment API will be available in Spring release 2019.