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

# Delete a segment

`DELETE /api/v1/segments/{id}`

## Request

- Base URL: `https://app.convertflow.co`
- URL: `https://app.convertflow.co/api/v1/segments/{id}`
- Auth: HTTP bearer

Deletes the segment and all its conditions, then republishes the website script. Refused with 409 while any campaign, site-wide or funnel condition still targets the segment ("If (NOT) in custom segment"); the response lists those conditions and, for campaign conditions, the campaign. Remove them in the dashboard first. Requires segments:delete, which is only available to personal access tokens, never to MCP connections.

## Response `200`

segment and its conditions deleted, website republished

- object
  - `status` string
  - `code` integer
  - `message` string

## Other responses

- `403`: token lacks the segments:delete scope
- `404`: segment belongs to another website
- `409`: segment still targeted by a campaign

---

[API](https://skmtc.dev/convertflow/apis/convertflow-api.md) - [All operations](https://skmtc.dev/convertflow/apis/convertflow-api/llms.txt) - [OpenAPI document](https://skmtc.dev/convertflow/apis/convertflow-api/revisions/9a45e0736b68?raw)
