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

# API basics

> Base URL, keys, safe retries, amounts, errors and limits of the reseller API.

## 🌐  Base URL

```text theme={null}
https://proxylane.dev/api/v1
```

Requests and responses are JSON. Send `Content-Type: application/json` with a body.

## 🔑  Keys

Create keys in the dashboard under [Settings → API keys](https://proxylane.dev/dashboard/settings#api-keys), or with **API** in the sidebar, and send one in every request:

```text theme={null}
Authorization: Bearer plr_your_key
```

* A key is shown once. We store only a hash of it.
* Keep up to 10 active keys, one per system that calls the API.
* The panel shows each key as its first and last characters, for example `plr_92X2…5AUK`, with the time it was last used.
* **Revoke** stops a key at once.

## 🔁  Safe retries

Requests that buy or move traffic need an `Idempotency-Key` header: purchase, create, allocate, reclaim, ISP orders and ISP renewals. Use a new random value, for example a UUID, for each action.

If the network drops and you repeat the request with the same key, we return the first result instead of doing it twice. The response then has `Idempotent-Replayed: true`.

| Situation | Result |
| - | - |
| Same key, same request, finished | First response, nothing repeats |
| Same key, different body | `422 idempotency_key_reused` |
| Same key while the first request still runs | `409 idempotency_in_progress`, retry in a few seconds |
| The first request failed | Nothing changed, the same key runs again |

Keys are kept for 24 hours. Rename, pause, resume and delete accept the header too.

## 📏  Amounts

* Send traffic in GB: `"gb": 2.5`. Up to three decimals, so 1 MB is the smallest step. Purchases are whole GB.
* 1 GB is 1,000,000,000 bytes.
* Every response field ending in `_bytes` has a twin ending in `_gb`.

## ⚠️  Errors

Errors look the same everywhere:

```json theme={null}
{
  "error": {
    "code": "insufficient_pool_traffic",
    "message": "Not enough traffic in your pool. Buy more traffic to continue.",
    "available_bytes": 1200000000
  }
}
```

| Status | Code | What to do |
| - | - | - |
| 400 | `idempotency_key_required` | Add an `Idempotency-Key` header |
| 401 | `unauthenticated` | Check the key, or create a new one |
| 402 | `insufficient_balance` | Add funds. `required_cents` shows the price. ISP orders show your balance in `balance_cents` |
| 403 | `reseller_access_required` | Reseller access is off for this account |
| 403 | `isp_not_enabled` | ISP orders over the API are off. [Message us](https://docs.proxylane.dev/support.md) |
| 404 | `subaccount_not_found` | The ID is wrong or belongs to another account |
| 404 | `isp_order_not_found` | The ISP order ID is wrong or belongs to another account |
| 409 | `insufficient_pool_traffic` | Buy traffic first. `available_bytes` shows the pool |
| 409 | `insufficient_subaccount_traffic` | Return less. `available_bytes` shows what's left |
| 409 | `operation_in_review` | Our team is checking this sub-account. Try later |
| 409 | `balance_review` | Your balance needs a payment review. [Message us](https://docs.proxylane.dev/support.md) |
| 410 | `subaccount_deleted` | The sub-account was deleted |
| 422 | `validation_failed` | `fields` lists what to fix |
| 429 | `rate_limited` | Slow down. Wait for `Retry-After` seconds |
| 503 | `provider_unavailable` | Try again in a minute |
| 503 | `isp_unavailable` | ISP IPs are not on sale right now. Try later |

## ⏱️  Limits

* 120 requests per minute per key.
* Up to 1,000 sub-accounts per account. [Ask us](https://docs.proxylane.dev/support.md) if you need more.
* Up to 1,000 proxy lines per request.

Every endpoint with its fields is in **Reseller API reference** in the sidebar.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.