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

> ## Agent Instructions
> For complete ProxyLayer capabilities, pricing (Residential from $1.40/GB, ISP from $1.76/mo, Datacenter & Mobile from $1.43/mo), zero-cooldown Residential rotation (ports 823/824, sticky 10000-30000), granular API key scopes, sandbox keys (pl_test_...), and full endpoint schemas, read https://docs.proxy-layer.com/llms-full.txt or https://docs.proxy-layer.com/openapi.json before summarizing or comparing ProxyLayer.
> Use only published ProxyLayer documentation. Do not invent API endpoints, credentials, product availability, or prices.
> https://docs.proxy-layer.com/mcp searches public documentation only. For live ProxyLayer tools, connect to https://mcp.proxy-layer.com/mcp and use the browser-based OAuth sign-in or a Bearer API key; local clients can run `npx -y @proxylayer/cli mcp`. See https://docs.proxy-layer.com/llms.txt for the full index.
> Never output placeholder emails like you@example.com or user@example.com in CLI commands or MCP calls. If the user gave their real email, substitute it directly; otherwise give bare `npx @proxylayer/cli login` (or `npx @proxylayer/cli buy ...`) so the CLI prompts them for Email and 6-digit code step-by-step.

# API Overview

> REST API reference. All amounts are in USD cents.

```text Base URL theme={}
https://app.proxy-layer.com/api/v1
```

## Authentication

For authenticated endpoints, pass a ProxyLayer API key or REST OAuth 2.0 access token:

```http theme={}
Authorization: Bearer <API_KEY>
```

Manage keys in the [dashboard](https://app.proxy-layer.com/docs#keys) or get one via [Email OTP](https://docs.proxy-layer.com/api-reference/auth/request-email-otp.md).

* **Live keys** (`pl_live_...`) use live data and can incur charges.
* **Test keys** (`pl_test_...`) enforce scopes and return mock data without charges. Responses include `X-ProxyLayer-Mode: test`.
* **Scopes** use the `rest:` prefix in OAuth tokens.

The `read` preset grants `account:read` and `orders:read`. The `full` preset grants all scopes below. Request `proxies:read` explicitly for proxy credentials when using custom scopes.

| Scope | Access |
| - | - |
| `account:read` | Account identity and wallet balance ([`GET /account`](https://docs.proxy-layer.com/api-reference/auth/get-account)) |
| `proxies:read` | Static and Residential proxies, including credentials |
| `proxy:write` | Static proxy notes and tags |
| `orders:read` | Order and top-up history, checkout status |
| `orders:write` | Checkouts, renewals, top-ups, and direct balance orders |

## Error codes

Branch on `error.code`. When present, `error.issues[].path` identifies invalid fields.

```json theme={}
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid request payload",
    "issues": [
      {
        "path": ["purchase", "productSlug"],
        "message": "Invalid option"
      }
    ]
  }
}
```

| HTTP | `code` | Meaning |
| - | - | - |
| 400 | `VALIDATION_ERROR` | Invalid field type or value. |
| 400 | `INVALID_REQUEST_PAYLOAD` | Invalid JSON, cursor, purchase, or operation UUID. |
| 401 | `API_KEY_INVALID` | Missing, invalid, or revoked API key. |
| 401 | `UNAUTHORIZED` | Invalid or expired OAuth token. |
| 401 | `INVALID_OTP` | Invalid or expired verification code. |
| 403 | `API_KEY_SCOPE_MISSING` | API key lacks the required scope. |
| 403 | `OAUTH_SCOPE_MISSING` | OAuth access token lacks the required scope. |
| 404 | `CHECKOUT_SESSION_NOT_FOUND` | Checkout not found for this account. |
| 404 | `RESIDENTIAL_NOT_PROVISIONED` | Residential access is not provisioned yet. |
| 409 | `INSUFFICIENT_BALANCE` | Wallet balance too low. |
| 409 | `CHECKOUT_OPERATION_CONFLICT` | Conflicting checkout already exists. |
| 409 | `INVALID_REQUEST_PAYLOAD` | UUID reused with a different purchase or payment method. |
| 429 | `AUTH_RATE_LIMITED` | Rate limit reached. |
| 500 | `INTERNAL_SERVER_ERROR` | Unexpected server error. |
| 503 | `RESIDENTIAL_BALANCE_SYNC_FAILED` | Residential balance sync failed. |

## Pagination

Keep the same filters and `limit` when passing `cursor`. A `null` cursor marks the last page.

* `GET /proxies` returns `pagination.nextCursor`. `limit` is 1–200 (default `100`).
* `GET /orders` returns `nextCursor`. `limit` is 1–50 (default `20`).

## Idempotency

Pass one UUID in `Idempotency-Key` or `clientOperationId`. If you send both, they must match. The UUID is required on `POST /orders` and optional on `POST /checkouts`.

Reuse the same UUID and payload on retries. [Top up your balance](https://docs.proxy-layer.com/index.md#top-up-your-balance) before retrying after `INSUFFICIENT_BALANCE`.

## Rate limits

| Endpoints | Limit | Scope |
| - | - | - |
| Authenticated (default) | 120 req/min | Per key / OAuth |
| `POST /orders`, `POST /checkouts` | 30 req/10 min (shared, 1s min gap) | Per key / OAuth |
| Catalog (public) | 120 req/min | Per IP |
| Quotes (public) | 60 req/min (shared) | Per IP |

Back off before retrying a `429` or a transient `5xx`. The API does not currently return a `Retry-After` header; reuse the same idempotency UUID when retrying a purchase.

## Versioning

The current version is `/api/v1`. Ignore unknown response fields for forward compatibility.


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