Segments
Delete Segment
Deletes a saved segment. Admins and owners can delete any segment; 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. Admins and owners can delete any segment; members can delete segments they created. Links that already expanded the segment's filters keep working.
Path Parameters
Prop
Type
Response
Prop
Type
curl -X DELETE "https://app.onyxmetric.com/api/sites/1/segments/12" \
-H "Authorization: Bearer your_api_key_here"const response = await fetch(
'https://app.onyxmetric.com/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.onyxmetric.com/api/sites/1/segments/12',
headers={'Authorization': 'Bearer your_api_key_here'}
)
data = response.json(){
"success": true
}