Segments
Use the Segments API to create and manage membership segments. For each endpoint in the API, the Authorization header you provide in the request must be assigned a client access token.
Endpoints
| Endpoint | Method and URL | Description |
|---|---|---|
| Create a membership segment | POST /v2/marketing/segments/create_membership_segment | Creates a new membership segment for the authenticated client. |
| Get a segment | GET /v2/marketing/segments/{segment_id} | Returns a single segment by its ID. |
| List segments | GET /v2/marketing/segments | Returns the segments available to the authenticated client, with optional pagination. |
| Add members to a segment | POST /v2/marketing/segments/add_to_membership_segment | Adds external IDs to a membership segment. |
| Remove members from a segment | POST /v2/marketing/segments/remove_from_membership_segment | Removes external IDs from a membership segment. |
| Clear a segment's membership | POST /v2/marketing/segments/clear_membership_segment | Clears all members from a membership segment. |
| Get clear status | GET /v2/marketing/segments/{segment_id}/clear_status | Returns the current clear-membership workflow status for a segment. |