Function create_segments

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

Create segments 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 Segments endpoint and re-create it with this endpoint to edit.