# Delete a portfolio segment.

`DELETE /segments/{segment_id}`

> Wheelhouse Revenue Management API. Web version: https://docs.usewheelhouse.com/rm/reference/rm-delete-segment · OpenAPI spec: https://docs.usewheelhouse.com/rm/openapi.yaml · Operation ID: `rmDeleteSegment` · Tag: Segments

Permanently deletes a portfolio segment owned by the authenticated user. Listings matched by the segment's filter are not affected. Deleting the default segment leaves the user with no default segment.
A segment assigned to a team member cannot be deleted, because doing so would change which listings that team member can access. Remove it from the team member's assigned segments with `POST /teams/members/{sub_user_id}/assigned_segments` first.

## Request

`DELETE https://api.usewheelhouse.com/ss_api/v1/segments/{segment_id}`

Authentication: send your RM API key in the `X-Integration-Api-Key` header (see https://docs.usewheelhouse.com/rm/authentication.md). Modifies data; read-only keys get `403 Forbidden`.

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `segment_id` | integer | yes | The Wheelhouse internal segment ID. |

### Example request

```bash
curl -X DELETE 'https://api.usewheelhouse.com/ss_api/v1/segments/{segment_id}' \
  -H 'X-Integration-Api-Key: <your RM API key>'
```

Only required parameters and body fields are filled in, with placeholder values. Add the optional ones you need from the lists above; some are required in combination, as their descriptions say.

## Responses

### 204

Segment deleted.

### 400

The segment is assigned to a team member. Unassign it first.

### 401

API key authorization failed.

### 403

Read-only API key cannot delete segments.

### 404

Segment not found or does not belong to the authenticated user.

### 409

A change to the account's team members is in progress. Retry after it completes.

### 429

Rate limit exceeded — the API key has sent too many requests. Wait before retrying. See the **Rate Limits** section in the overview for the recommended exponential backoff strategy.

Body (`application/json`): object

- `error` (string, example: `API token is at rate limit`)

Example shape (generated from the schema; placeholder values, not a real response):

```json
{
  "error": "API token is at rate limit"
}
```
