OnyxMetric
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/:segmentId

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.

Path Parameters

Prop

Type

Response

Prop

Type

Request
curl -X DELETE "https://app.onyxmetric.com/api/sites/1/segments/12" \
  -H "Authorization: Bearer your_api_key_here"
Request
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();
Request
import requests

response = requests.delete(
    'https://app.onyxmetric.com/api/sites/1/segments/12',
    headers={'Authorization': 'Bearer your_api_key_here'}
)

data = response.json()
Response
{
  "success": true
}