# Reseller API: overview

> What an RH7 reseller can do through the API: create customers, distribute GB, buy balance, receive alerts and track everything without leaving your system.
> Page: https://rh7proxys.com/en/docs/revenda · Index: https://rh7proxys.com/llms.txt

The reseller API is for anyone who sells RH7 proxies under their own brand. With it, your system creates customers, delivers GB, buys balance and receives alerts, without anyone needing to open the panel. The reseller panel keeps working alongside it: everything the API does shows up there, and the other way around.

To get access, you must be an active reseller. The terms are at [Become a reseller](https://rh7proxys.com/revendedor).

## How the balance works

1. You buy GB for your balance, at the reseller price (in the panel or with `POST /pool/orders`).
2. You create a customer (subuser). They get their own proxy, with a username and password.
3. You move GB from your balance to the customer. Their proxy starts working right away.
4. The customer uses it. When their GB runs out, you give them more.

Right now, reseller customers use the Residential Proxy.

## Address

```text
https://api.rh7proxys.com
```

Reseller routes sit right at the root, for example `https://api.rh7proxys.com/auth/me`. The same address also serves the [client API](https://rh7proxys.com/en/docs/api) on the `/v1/` routes with `rh7k_` keys.

## Reseller key

Create it in the panel, under **Reseller > API Keys**. The key starts with `rh7_` (older `rh7r_` keys still work) and is shown only once.

```http
x-api-key: rh7_your_key
```

or

```http
Authorization: Bearer rh7_your_key
```

The key can have an IP list and an expiration date. From outside the list, the response is `403 ip_not_allowed`.

## Permissions

| Permission | What it allows |
|---|---|
| `read` | All queries (GET) |
| `subusers:write` | Create, edit and delete customers |
| `traffic:write` | Move GB to customers |
| `billing:write` | Buy GB for your balance |
| `webhooks:write` | Register, change and test webhooks |
| `*` | Everything |

Without the permission, the response is `403 insufficient_scope` with the `required` field.

## Limits

- 120 calls per minute per key. Above that: `429 rate_limited` with the `Retry-After` header.
- Creating customers has its own limit against abuse. When you go over it, the response is also `429`.

## Error format

The reseller API returns errors like this:

```json
{ "error": "insufficient_pool", "required_gb": 10 }
```

The `error` field is a fixed lowercase code. Each page lists the codes for its routes.

## Route map

| Method | Route | What for |
|---|---|---|
| GET | `/auth/me` | Reseller and key details |
| GET | `/quota/me` | Your GB balance |
| GET | `/pool/packages` | GB packages with your price |
| POST | `/pool/orders` | Buy GB by Pix, card or crypto |
| GET | `/pool/orders` | GB purchase history |
| GET | `/pool/orders/{id}` | Purchase status |
| GET | `/subusers` | List customers |
| POST | `/subusers` | Create a customer |
| GET | `/subusers/{id}` | Customer details |
| PATCH | `/subusers/{id}` | Change name, location, connection limit, blocked websites and status |
| DELETE | `/subusers/{id}` | Delete a customer |
| GET | `/subusers/{id}/credentials` | Username and password of the customer's proxy |
| POST | `/subusers/{id}/allocate-gb` | Move GB to the customer |
| GET | `/usage/user/{username}` | Usage by proxy username |
| GET/POST | `/webhooks` | List and register alerts |
| GET/PATCH/DELETE | `/webhooks/{id}` | View, change and delete an alert |
| POST | `/webhooks/{id}/test` | Send a test alert |
| GET/PATCH | `/webhooks/settings` | Balance alert thresholds |
| GET | `/webhooks/deliveries` | Alert deliveries |
| GET | `/api-logs` | Call history |

Details are in [Customers and GB](https://rh7proxys.com/en/docs/revenda-clientes), [Balance and buying GB](https://rh7proxys.com/en/docs/revenda-saldo), [Webhooks](https://rh7proxys.com/en/docs/revenda-webhooks) and [Call history](https://rh7proxys.com/en/docs/revenda-logs).

## Quick test

```bash
curl https://api.rh7proxys.com/auth/me \
  -H "x-api-key: rh7_your_key"
```

```json
{
  "reseller": { "id": "uuid", "status": "active", "slug": "minha-marca", "current_period_end": "2026-12-26T00:00:00Z" },
  "api_key": { "id": "uuid", "prefix": "rh7_ab12cd34", "scopes": ["*"] }
}
```

## Removed routes

| Old route | Use now |
|---|---|
| `POST /auth/login` (email and password) | Key created in the panel |
| `/wallet/*` and `POST /gb/purchase` | `POST /pool/orders` |
| `POST /subusers/{id}/register-consumption` | Usage is read automatically |

The old routes respond with `410` and the new path.
