# Delete a Single Gate User ID 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 Gate User ID Override

**DELETE** `/console/v1/gates/{id}/overrides/userID/{userID}`

Full URL: `https://statsigapi.net/console/v1/gates/{id}/overrides/userID/{userID}`

Delete a Single Gate User ID Override

Removes a single user ID from the matching pass/fail userID override bucket on the gate. Idempotent: returns 200 even when the user ID is not currently overridden. Only clears the all-environments userID bucket; environment-scoped and custom-ID overrides are left untouched.

## Authorizations

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

## Path parameters

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| id (path) | string | Yes | — | Gate name |
| userID (path) | string | Yes | — | User ID to remove from the override |

## Query parameters

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| groupID (query) | string | Yes | — | Whether the user ID was overridden to pass or fail the gate. Allowed values: pass, fail |

## Response (application/json)

**201** — Delete Single Gate User ID Override Success

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| message | string | Yes | — | A simple string explaining the result of the operation. |
| data | object | Yes | — | Contract for overrides |
| data.passingUserIDs | string[] | Yes | ["user123","user456","user789"] | List of user IDs |
| data.failingUserIDs | string[] | Yes | ["user123","user456","user789"] | List of user IDs |
| data.passingCustomIDs | string[] | No | ["custom123","custom456"] | Optional list of custom IDs |
| data.failingCustomIDs | string[] | No | ["custom123","custom456"] | Optional list of custom IDs |
| data.environmentOverrides | object[] | Yes | — | — |
| data.environmentOverrides.environment | string | No | staging | Environment Constraints: nullable |
| data.environmentOverrides.unitID | string | Yes | unit123 | Unit ID Constraints: nullable |
| data.environmentOverrides.passingIDs | string[] | Yes | ["id1","id2"] | List of passing IDs |
| data.environmentOverrides.failingIDs | string[] | Yes | ["id3","id4"] | List of failing IDs |

```json
{
  "passingUserIDs": [
    "passing-user"
  ],
  "failingUserIDs": [
    "failing-user"
  ]
}
```

**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** — Gate 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/gates/{id}/overrides/userID/{userID}" \
  -H "Content-Type: application/json" \
  -H "STATSIG-API-KEY: YOUR_API_KEY"
```

### Python

```python
import requests

response = requests.delete(
    "https://statsigapi.net/console/v1/gates/{id}/overrides/userID/{userID}",
    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/gates/{id}/overrides/userID/{userID}", {
  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/gates/{id}/overrides/userID/{userID}");
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/gates/{id}/overrides/userID/{userID}", 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/gates/{id}/overrides/userID/{userID}"))
      .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/gates/{id}/overrides/userID/{userID}")
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
```
