---
title: "Delete a segment"
method: DELETE
path: "/v1/projects/{projectIdOrName}/feature-flags/segments/{segmentIdOrSlug}"
tags: ["feature-flags"]
---

# Delete a segment

`DELETE /v1/projects/{projectIdOrName}/feature-flags/segments/{segmentIdOrSlug}`

## Request

- Base URL: `https://api.vercel.com`
- URL: `https://api.vercel.com/v1/projects/{projectIdOrName}/feature-flags/segments/{segmentIdOrSlug}`
- Auth: HTTP bearer

Delete a feature flag segment.

## Path parameters

- `projectIdOrName` string, required: The project id or name
- `segmentIdOrSlug` string, required: The segment slug

## Query parameters

- `withMetadata` boolean: Whether to include metadata
- `teamId` string
- `slug` string

## Response `204`

## Other responses

- `304`
- `400`: One of the provided values in the request query is invalid.
- `401`: The request is not authorized.
- `402`: The account is missing a payment so payment method must be updated
- `403`: You do not have permission to access this resource.
- `404`
- `409`
- `410`

## Changes

- **2026-07-27** `2b8120c6d584`: 1 info
  - removed the non-success response with the status `412`
- **2026-07-21** `2ae10ee9d21c`: 1 info
  - added the non-success response with the status `410`
- **2026-06-22** `7bd30e62d868`: 1 info
  - added the non-success response with the status `304`
- **2026-06-11** `14b4658f819e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/vercel/apis/vercel-api/changes/v1/projects/:projectIdOrName/feature-flags/segments/:segmentIdOrSlug/delete.md)

---

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