---
title: Delete a Single Layer Override
description: "Removes a single gate or segment override from the layer. Idempotent: returns 200 even when no matching override exists."
product: general
token_estimate: 1616
---
# Delete a Single Layer Override

> For AI agents: a documentation index is available at [/llms.txt](/llms.txt). Append `.md` to any page URL for markdown, or send `Accept: text/markdown`.

## Delete a Single Layer Override

**DELETE** `/console/v1/layers/{id}/overrides/conditional/{type}/{name}`

Full URL: `https://statsigapi.net/console/v1/layers/{id}/overrides/conditional/{type}/{name}`

Delete a Single Layer Override

Removes a single gate or segment override from the layer. Idempotent: returns 200 even when no matching override exists.

## Authorizations

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| STATSIG-API-KEY | string | Yes | — | apiKey (header) |

## Path parameters

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| id (path) | string | Yes | — | Layer name |
| type (path) | string | Yes | — | Override type Allowed values: gate, segment |
| name (path) | string | Yes | — | Name of the gate or segment being overridden |

## Query parameters

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| groupName (query) | string | Yes | — | Experiment group the override targets |
| experimentName (query) | string | Yes | — | Experiment within the layer that owns the override |
| environment (query) | string | No | — | Environment the override is scoped to. Omit to target the override that applies to all environments. |

## Response (application/json)

**200** — Delete Single Layer Override Success

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| message | string | Yes | — | A simple string explaining the result of the operation. |
| data | object | Yes | — | — |
| data.conditionalOverrides | object[] | Yes | — | — |
| data.conditionalOverrides.type | string | Yes | — | Describes whether layer override is segment or gate |
| data.conditionalOverrides.name | string | Yes | — | Name of override entity |
| data.conditionalOverrides.experimentName | string | Yes | — | — |
| data.conditionalOverrides.groupName | string | Yes | — | — |
| data.conditionalOverrides.environment | string | No | — | Optional environment scope (e.g. production, staging). Omit or pass null to target the all-environments bucket. Constraints: nullable |
| data.idOverrides | object[] | Yes | — | — |
| data.idOverrides.groupName | string | Yes | — | Group that ID is overriden into |
| data.idOverrides.ids | string[] | Yes | — | ID being overriden into a particular group |
| data.idOverrides.idType | string | No | — | Constraints: nullable |
| data.idOverrides.environment | string | No | — | Constraints: nullable |
| data.idOverrides.experimentName | string | No | — | Constraints: nullable |

```json
{
  "message": "string",
  "data": {
    "conditionalOverrides": [
      {
        "type": "string",
        "name": "string",
        "experimentName": "string",
        "groupName": "string",
        "environment": "string"
      }
    ],
    "idOverrides": [
      {
        "groupName": "string",
        "ids": [
          "string"
        ],
        "idType": "string",
        "environment": "string",
        "experimentName": "string"
      }
    ]
  }
}
```

**401** — This endpoint only accepts an active CONSOLE key, but an invalid key was sent. Key: console-xxxXXXxxxXXXxxx

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| status | integer | Yes | — | Allowed values: 401 |
| message | string | Yes | — | — |

```json
{
  "status": 401,
  "message": "This endpoint only accepts an active CONSOLE key, but an invalid key was sent. Key: console-xxxXXXxxxXXXxxx"
}
```

**404** — Layer not found.

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| status | integer | Yes | — | Allowed values: 404 |
| message | string | Yes | — | — |

```json
{
  "status": 404,
  "message": "Not Found. The requested resource could not be found."
}
```

## Code samples

### cURL

```bash
curl -X DELETE "https://statsigapi.net/console/v1/layers/{id}/overrides/conditional/{type}/{name}" \
  -H "Content-Type: application/json" \
  -H "STATSIG-API-KEY: YOUR_API_KEY"
```

### Python

```python
import requests

response = requests.delete(
    "https://statsigapi.net/console/v1/layers/{id}/overrides/conditional/{type}/{name}",
    headers={
        "Content-Type": "application/json",
        "STATSIG-API-KEY": "YOUR_API_KEY"
    }
)
data = response.json()
```

### JavaScript

```javascript
const response = await fetch("https://statsigapi.net/console/v1/layers/{id}/overrides/conditional/{type}/{name}", {
  method: "DELETE",
  headers: {
    "Content-Type": "application/json",
    "STATSIG-API-KEY": "YOUR_API_KEY"
  }
});
const data = await response.json();
```

### PHP

```php
<?php
$ch = curl_init("https://statsigapi.net/console/v1/layers/{id}/overrides/conditional/{type}/{name}");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Content-Type: application/json",
    "STATSIG-API-KEY: YOUR_API_KEY"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
```

### Go

```go
package main

import (
  "bytes"
  "net/http"
)

func main() {
req, _ := http.NewRequest("DELETE", "https://statsigapi.net/console/v1/layers/{id}/overrides/conditional/{type}/{name}", nil)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("STATSIG-API-KEY", "YOUR_API_KEY")
  client := &http.Client{}
  resp, _ := client.Do(req)
  defer resp.Body.Close()
}
```

### Java

```java
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
      .uri(URI.create("https://statsigapi.net/console/v1/layers/{id}/overrides/conditional/{type}/{name}"))
      .method("DELETE", HttpRequest.BodyPublishers.noBody())
.header("Content-Type", "application/json")
      .header("STATSIG-API-KEY", "YOUR_API_KEY")
      .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
```

### Ruby

```ruby
require "net/http"
require "json"

uri = URI("https://statsigapi.net/console/v1/layers/{id}/overrides/conditional/{type}/{name}")
request = Net::HTTP::Delete.new(uri)
request["Content-Type"] = "application/json"
request["STATSIG-API-KEY"] = "YOUR_API_KEY"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
  http.request(request)
end
```

