---
updatedAt: 2025-11-16T23:21:46.000Z
agentTools:
  projectIndex: https://docs.split.io/llms.txt
---

# Delete Segment

Delete a segment from your account. This automatically unconfigures the segment definition from all FME environments.

<HTMLBlock>{`
<h3 style="color:#00A8FF;">Access requirements</h3>
<p>The Authorization Bearer (Admin API Key authorizing the request) must have one of the following roles and scopes:</p>
<h4 style="color:#00A8FF; font-weight: normal;">Admin API Key roles accepted</h4>
<ul style="color:#0A0A32;">
  <li>API_ALL_GRANTED</li>
  <li>API_SEGMENT_EDITOR</li>
</ul>
<h4 style="color:#00A8FF; font-weight: normal;">Admin API Key scopes accepted</h4>
<ul style="color:#0A0A32;">
  <li>GLOBAL</li>
  <li>WORKSPACE</li>
</ul>
<br><label><em>Project (Workspace) View Restrictions may apply to this API.</em><label>
`}</HTMLBlock>

To learn more about Admin API Key roles and scopes, see [API keys overview](https://docs.split.io/reference/api-keys-overview#admin-api-key-roles).

***

## JSON Payload Posted

```json
{
 "name": String, // Mandatory
 "description": String // Optional
}
```

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "api-settings",
    "version": "2"
  },
  "servers": [
    {
      "url": "https://api.split.io/internal/api/v2"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/segments/ws/{workspace-id}/{segment-name}": {
      "delete": {
        "summary": "Delete Segment",
        "description": "Delete a segment from your account. This automatically unconfigures the segment definition from all environments.",
        "operationId": "delete-segment",
        "parameters": [
          {
            "in": "path",
            "name": "workspace-id",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The ID of the project (workspace) where you want to delete the segment. After migration to Harness, get this value using the [Get Projects (Workspaces)](https://docs.split.io/reference/get-workspaces#/) endpoint and the Harness project name."
          },
          {
            "in": "path",
            "name": "segment-name",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The name of the segment to delete"
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "true"
                  }
                },
                "schema": {
                  "type": "boolean",
                  "example": true,
                  "default": true
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Unauthorized": {
                    "value": "{\n    \"code\": 401,\n    \"message\": \"\",\n    \"details\": \"\",\n    \"transactionId\": \"170x4r3uwhe\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 401,
                      "default": 0
                    },
                    "message": {
                      "type": "string",
                      "example": ""
                    },
                    "details": {
                      "type": "string",
                      "example": ""
                    },
                    "transactionId": {
                      "type": "string",
                      "example": "170x4r3uwhe"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "examples": {
                  "traffic type does not exist": {
                    "value": "{\n    \"code\": 404,\n    \"message\": \"Could not find traffic type ....\",\n    \"details\": \"\",\n    \"transactionId\": \"170x64syw8t\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 404,
                      "default": 0
                    },
                    "message": {
                      "type": "string",
                      "example": "Could not find traffic type ...."
                    },
                    "details": {
                      "type": "string",
                      "example": ""
                    },
                    "transactionId": {
                      "type": "string",
                      "example": "170x64syw8t"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl -v -X DELETE \\\n  -H 'Content-Type: application/json' \\\n  -H 'Authorization: Bearer ADMIN_API_KEY' \\\n  https://api.split.io/internal/api/v2/segments/ws/{workspace-id}/{segment-name}"
            }
          ],
          "samples-languages": [
            "curl"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```