Segments
Delete Segment
Deletes a saved segment. Editors and above can delete any segment on the site; members can delete segments they created. Links that already expanded the segment's filters keep working.
DELETE /api/sites/:site/segments/:segmentIdDeletes a saved segment. Links that already expanded the segment's filters keep working.
Editors and above can delete any segment on the site, including through a per-site editor grant; members can delete segments they created. Organization-wide segments need the editor role or above in the organization, even for the segment's creator. Returns 403 when you may not delete it and 404 when it does not exist on this site.
Path Parameters
Prop
Type
Response
Prop
Type
curl -X DELETE "https://app.rybbit.io/api/sites/1/segments/12" \
-H "Authorization: Bearer your_api_key_here"const response = await fetch(
'https://app.rybbit.io/api/sites/1/segments/12',
{
method: 'DELETE',
headers: {
'Authorization': 'Bearer your_api_key_here'
}
}
);
const data = await response.json();import requests
response = requests.delete(
'https://app.rybbit.io/api/sites/1/segments/12',
headers={'Authorization': 'Bearer your_api_key_here'}
)
data = response.json(){
"success": true
}