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

# Reseller API overview

> Manage your bandwidth pool, subusers, and allocations programmatically

The Reseller API lets reseller-tier accounts manage their bandwidth pool and create and manage sub-accounts (subusers). You allocate bandwidth from your pool to subusers, who then use proxy services under your store code.

## Who can use it

These endpoints require a `RESELLER` account. If your account isn't a reseller, every request returns `403 NOT_RESELLER`. To upgrade, contact support via the website chat.

## Base URL

```
https://www.eclipseproxy.com
```

All reseller endpoints live under `/api/reseller/v1/`.

## Authentication

Every endpoint authenticates with your reseller API key. Pass it one of two ways:

**Bearer token:**

```http theme={"dark"}
Authorization: Bearer YOUR_API_KEY
```

**API key header:**

```http theme={"dark"}
X-API-Key: YOUR_API_KEY
```

Get your API key from your dashboard.

### Authentication errors

| Status | Code           | Meaning                    |
| ------ | -------------- | -------------------------- |
| 401    | `UNAUTHORIZED` | Missing or invalid API key |
| 403    | `NOT_RESELLER` | Account is not a reseller  |

```json theme={"dark"}
{
  "status": "error",
  "message": "Unauthorized",
  "messageCode": "UNAUTHORIZED",
  "data": null
}
```

## Response format

Every response follows the same envelope:

```json theme={"dark"}
{
  "status": "success",
  "message": "Human-readable message",
  "messageCode": "MACHINE_READABLE_CODE",
  "data": null
}
```

* `status`: `"success"` or `"error"`
* `message`: human-readable summary
* `messageCode`: stable, machine-readable code for branching logic
* `data`: the payload, or `null`

## Status codes

| Code | Meaning                                   |
| ---- | ----------------------------------------- |
| 200  | OK                                        |
| 201  | Created                                   |
| 400  | Bad request (invalid input)               |
| 401  | Unauthorized (missing or invalid API key) |
| 403  | Forbidden (not a reseller)                |
| 404  | Not found (resource doesn't exist)        |
| 409  | Conflict (e.g. username already taken)    |
| 422  | Unprocessable entity (validation error)   |

## Endpoints

<CardGroup cols={2}>
  <Card title="Get bandwidth info" icon="gauge" href="/api/reseller/get-bandwidth">
    Pool balance and account overview
  </Card>

  <Card title="List subusers" icon="users" href="/api/reseller/list-subusers">
    All subusers under your account
  </Card>

  <Card title="Create subuser" icon="user-plus" href="/api/reseller/create-subuser">
    Create a subuser and allocate bandwidth
  </Card>

  <Card title="Get subuser" icon="user" href="/api/reseller/get-subuser">
    Details for one subuser
  </Card>

  <Card title="Update password" icon="key" href="/api/reseller/update-password">
    Reset a subuser's password
  </Card>

  <Card title="Get IP whitelist" icon="list" href="/api/reseller/get-whitelist">
    A subuser's whitelisted IPs
  </Card>

  <Card title="Add whitelist IP" icon="plus" href="/api/reseller/add-whitelist-ip">
    Whitelist an IP for a subuser
  </Card>

  <Card title="Remove whitelist IP" icon="minus" href="/api/reseller/remove-whitelist-ip">
    Remove a whitelisted IP
  </Card>

  <Card title="Subuser bandwidth" icon="chart-simple" href="/api/reseller/get-subuser-bandwidth">
    Allocation and usage for a subuser
  </Card>

  <Card title="Bandwidth history" icon="clock-rotate-left" href="/api/reseller/get-subuser-bandwidth-history">
    Allocation history for a subuser
  </Card>
</CardGroup>

## Notes

* **Subuser naming**: usernames are automatically prefixed with your `storeCode`. Passing `user1` creates `MYSTORE_user1`.
* **Bandwidth units**: all bandwidth values are in MB.
* **Store code**: assigned when your account is created and cannot be changed.
* **Subuser provisioning**: subusers are created upstream and synced to your account.
