---
title: "Delete a segment"
method: DELETE
path: "/segments/{id}"
tags: ["Segments"]
---

# Delete a segment

`DELETE /segments/{id}`

## Request

- Base URL: `https://www.unitpost.com/api/v1`
- URL: `https://www.unitpost.com/api/v1/segments/{id}`
- Auth: HTTP bearer

Delete a segment. The contacts themselves are untouched — only the grouping is removed. This is blocked with `409` while an active campaign still targets the segment; cancel or finish that campaign first (see [List campaigns](#get-email-campaigns)). Requires the `segments:write` capability.

## Response `204`

Deleted.

## Other responses

- `401`: Missing or invalid API key.
- `404`: Segment not found.
- `409`: Segment is referenced by an active campaign.

---

[API](https://skmtc.dev/unitpost/apis/unitpost-api.md) · [All operations](https://skmtc.dev/unitpost/apis/unitpost-api/llms.txt) · [OpenAPI document](https://skmtc.dev/unitpost/apis/unitpost-api/revisions/86ff7c890967?raw)
