create_segment

Function create_segment 

Source
pub async fn create_segment(
    configuration: &Configuration,
    app_id: &str,
    segment: Option<Segment>,
) -> Result<CreateSegmentSuccessResponse, Error<CreateSegmentError>>
Expand description

Create a segment visible and usable in the dashboard and API - Required: OneSignal Paid Plan The Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple "AND" or "OR" operator’s. 🚧 Does Not Update Segments This endpoint will only create segments, it does not edit or update currently created Segments. You will need to use the Delete Segment endpoint and re-create it with this endpoint to edit.