---
title: "Delete a segment"
method: DELETE
path: "/v1/sites/{site_id}/segments/{segment_id}"
tags: ["Segments"]
---

# Delete a segment

`DELETE /v1/sites/{site_id}/segments/{segment_id}`

## Request

- Base URL: `https://api.getsitecontrol.com`
- URL: `https://api.getsitecontrol.com/v1/sites/{site_id}/segments/{segment_id}`
- Auth: HTTP bearer

Deletes a segment that nothing uses; the contacts in it are not touched.
A segment is in use while an automation that is not deleted (enabled or
not), a broadcast that has not ended (drafts included) or another segment
refers to it: change or delete those first. Deletion cannot be undone.

## Path parameters

- `site_id` integer, required
- `segment_id` integer, required: Segment id from `list_segments`

## Response `204`

Successful Response

## Other responses

- `400`: Unsupported GSC-Version
- `401`: Missing or invalid API key or access token
- `403`: Access denied
- `404`: `segment_not_found`: no segment with this id on the site; deleting again gives it too
- `409`: `segment_in_use`: the segment is used. `metadata.automation_ids`, `broadcast_ids` and `segment_ids` list who uses it, up to 50 of each
- `422`: Validation failed
- `429`: Rate limited
- `503`: Temporarily unavailable; retry later

---

[API](https://skmtc.dev/getsitecontrol/apis/getsitecontrol-public-api.md) - [All operations](https://skmtc.dev/getsitecontrol/apis/getsitecontrol-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getsitecontrol/apis/getsitecontrol-public-api/revisions/084fcad80e75?raw)
