> ## Documentation Index
> Fetch the complete documentation index at: https://docs.deepidv.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Exclude Face

> Flag a session's enrolled face as excluded

```
POST /v1/igaming/self-exclusion/face
```

Flags the face enrolled during a verification session as excluded, independent of any document number.

If the session was a `DUPLICATE` and has no enrollment of its own, the flag falls back to the **matched original enrollment**, so the physical face is still blocked.

## Request

### Headers

| Header         | Required | Description        |
| -------------- | -------- | ------------------ |
| `x-api-key`    | Yes      | Your API key       |
| `Content-Type` | Yes      | `application/json` |

### Body parameters

Field names are snake\_case only — there are no camelCase aliases.

| Parameter    | Type   | Required | Description                                |
| ------------ | ------ | -------- | ------------------------------------------ |
| `session_id` | string | Yes      | The session whose enrolled face to exclude |
| `reason`     | string | No       | Free-text reason for the exclusion         |

### Example request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.deepidv.com/v1/igaming/self-exclusion/face \
    -H "Content-Type: application/json" \
    -H "x-api-key: YOUR_API_KEY" \
    -d '{
      "session_id": "b8991ba9-2566-4fe5-b758-66f387c3e28b",
      "reason": "self-requested exclusion"
    }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    "https://api.deepidv.com/v1/igaming/self-exclusion/face",
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        "x-api-key": "YOUR_API_KEY",
      },
      body: JSON.stringify({
        session_id: "b8991ba9-2566-4fe5-b758-66f387c3e28b",
        reason: "self-requested exclusion",
      }),
    }
  );

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api.deepidv.com/v1/igaming/self-exclusion/face",
      headers={
          "Content-Type": "application/json",
          "x-api-key": "YOUR_API_KEY",
      },
      json={
          "session_id": "b8991ba9-2566-4fe5-b758-66f387c3e28b",
          "reason": "self-requested exclusion",
      },
  )
  ```
</CodeGroup>

## Response

### 200 — Success

| Field                | Type    | Description                                                |
| -------------------- | ------- | ---------------------------------------------------------- |
| `excluded`           | boolean | Whether the face was successfully flagged                  |
| `session_id`         | string  | The session ID — present on success                        |
| `reason`             | string  | `no_enrolled_face` when nothing could be flagged           |
| `matched_session_id` | string  | Present only when the matched-enrollment fallback was used |

### Error responses

| Status                      | Description                       |
| --------------------------- | --------------------------------- |
| `400 Bad Request`           | Missing or malformed `session_id` |
| `401 Unauthorized`          | Invalid or revoked API key        |
| `403 Forbidden`             | `x-api-key` header missing        |
| `500 Internal Server Error` | Unexpected server error           |

<ResponseExample>
  ```json success theme={null}
  {
    "excluded": true,
    "session_id": "b8991ba9-2566-4fe5-b758-66f387c3e28b"
  }
  ```

  ```json nothing to flag theme={null}
  {
    "excluded": false,
    "reason": "no_enrolled_face"
  }
  ```
</ResponseExample>
