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

# Blacklist

> Block IPs and HWIDs from accessing your scripts.

# Blacklist Management

The blacklist allows you to permanently block specific IPs or HWIDs from executing any of your scripts. Blacklisted entries are checked during every authentication attempt.

***

## Get blacklist

`GET` `/api/vendor/blacklist`

Fetch all blacklisted IPs and HWIDs for your account.

#### Headers

| Name            | Type   | Required | Description           |
| --------------- | ------ | -------- | --------------------- |
| `Authorization` | String | ✅        | `Bearer YOUR_API_KEY` |

<Tabs>
  <Tab title="200 OK">
    ```json theme={null}
    [
        {
            "id": 1,
            "ip": "192.168.1.100",
            "hwid": null,
            "reason": "Leaked script to V3rmillion",
            "attempts": 3,
            "timestamp": "2026-05-03T12:00:00"
        },
        {
            "id": 2,
            "ip": null,
            "hwid": "a8f3b2c1d0e9f7a6...",
            "reason": "Chargeback",
            "attempts": 1,
            "timestamp": "2026-05-02T08:30:00"
        }
    ]
    ```
  </Tab>
</Tabs>

***

## Add to blacklist

`POST` `/api/vendor/blacklist`

Block an IP address, HWID, or both. You must provide at least one of `ip` or `hwid`.

#### Request Body

| Name     | Type   | Required | Description                                  |
| -------- | ------ | -------- | -------------------------------------------- |
| `ip`     | String | ❌        | IP address to block                          |
| `hwid`   | String | ❌        | Hardware ID to block                         |
| `reason` | String | ❌        | Reason for the ban (default: `"Manual ban"`) |

<Warning>
  You must provide at least one of `ip` or `hwid`. Providing both will block by either match.
</Warning>

<CodeGroup>
  ```bash cURL — Block an IP theme={null}
  curl -X POST https://auth.leaf7.fun/api/vendor/blacklist \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "ip": "192.168.1.100",
      "reason": "Attempted script dump"
    }'
  ```

  ```bash cURL — Block a HWID theme={null}
  curl -X POST https://auth.leaf7.fun/api/vendor/blacklist \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "hwid": "a8f3b2c1d0e9f7a6...",
      "reason": "Chargeback"
    }'
  ```
</CodeGroup>

<Tabs>
  <Tab title="200 OK">
    ```json theme={null}
    {
        "id": 3,
        "ip": "192.168.1.100",
        "hwid": null,
        "reason": "Attempted script dump",
        "attempts": 1,
        "timestamp": "2026-05-03T14:00:00"
    }
    ```
  </Tab>

  <Tab title="400 Bad Request">
    ```json theme={null}
    { "detail": "Must provide either IP or HWID" }
    ```
  </Tab>
</Tabs>

***

## Remove from blacklist

`DELETE` `/api/vendor/blacklist/{entry_id}`

Unblock a previously blacklisted IP or HWID.

#### Path Parameters

| Name       | Type    | Required | Description                                                 |
| ---------- | ------- | -------- | ----------------------------------------------------------- |
| `entry_id` | Integer | ✅        | ID of the blacklist entry to remove (from the GET response) |

<Tabs>
  <Tab title="200 OK">
    ```json theme={null}
    { "status": "success" }
    ```
  </Tab>

  <Tab title="404 Not Found">
    ```json theme={null}
    { "detail": "Entry not found" }
    ```
  </Tab>
</Tabs>
