v1

latestOpenAPI 3.1.02026-07-26497885.9 KB

Update segment

Update an existing segment's name and/or filters. The name parameter is always required. When filters are provided, all existing filters are replaced with the new ones.

patch/apps/{app_id}/segments/{segment_id}

Path parameters

app_idstring required

Your OneSignal App ID in UUID v4 format. See Keys & IDs.

segment_idstring required

The segment_id can be found in the URL of the segment when viewing it in the dashboard.

Headers

Authorizationstring required

Your App API key with prefix Key . See Keys & IDs.

Content-Typestring required

Request body

namestring required

Required. The segment name. Maximum 128 characters.

descriptionstring

Optional human-readable description for the segment. Maximum 255 characters. Pass an empty string to clear; omit to leave unchanged.

Response

200

successboolean

true if the segment was updated successfully, false otherwise.

idstring

The UUID of the updated segment.