Mobile Help Center
FAQ
Account Sign In Create Account
PREPROX FOR DEVELOPERS REST API v1

Static proxies.
24-hour leases.

Build with the PreProx Marketplace API for static proxy leases with unlimited bandwidth. Discover shared or private plans, purchase a 24-hour lease, and manage renewals.

Static IP leases 24-hour duration Unlimited bandwidth
YOUR FIRST REQUESTHTTPS + JSON
// Connect to your account
curl --fail-with-body "https://preprox.com/api/v1/marketplace/account" \
  -H "Authorization: Bearer $PREPROX_API_KEY" \
  -H 'Accept: application/json'
Your account Your wallet Your leases
MARKETPLACE LEASE API

Static proxy leases only.

Purchase and manage shared or private marketplace leases. GB data packages, SMS verification and rental numbers are separate products and are outside this API.

IP type
Static
Lease duration
24 hours
Bandwidth
Unlimited

Unlimited proxy bandwidth during the lease, subject to acceptable use. API request limits still apply. API key expiry does not extend a lease.

API access enabledA valid key and an eligible account are required.
Download OpenAPI 3.0
GETTING STARTED

A direct line to the marketplace.

Marketplace leases only

The Marketplace API brings inventory discovery, quotes, checkout, and management of 24-hour static proxy leases into your own server-side application. Leases include unlimited proxy bandwidth during their active period, subject to acceptable use. Every key belongs to a PreProx account and can access only that account’s wallet and leases.

BASE URLhttps://preprox.com/api/v1/marketplace
01 / DISCOVER

Find the right proxy

Filter live inventory by location, connection type, and plan.

02 / PURCHASE

Quote, then confirm

Set a price ceiling and pay from your existing wallet.

03 / MANAGE

Keep control

Read connections, refresh leases, and manage renewal.

GB residential data packages, SMS verification, rental numbers, payments, and account administration are outside this API. Mobile and Wi-Fi marketplace networks depend on live inventory. Add wallet funds through your PreProx dashboard.

SECURE BY DEFAULT

Authenticate every request.

Sign in, verify your email, then create an API key in your dashboard. Choose the minimum permissions your integration needs. The full key is shown once; save it in a server environment variable or secret manager.

An API key can last 1, 3, 6 or 12 months, or until revoked with Never. This controls API access only. Each proxy lease has its own 24-hour duration; enabled auto-renew authorizes a new billable lease period.

Authorization: Bearer YOUR_PREPROX_API_KEY
Accept: application/json
Content-Type: application/json
Content-Type is required when sending a JSON body.
marketplace:read

Read your marketplace

Account, wallet, inventory, and owned lease details.

marketplace:write

Make marketplace changes

Create quotes, purchase, refresh, update renewal or IP access, and request eligible refunds.

Use keys only on your server. Keep them out of browser code, mobile bundles, public repositories, and logs. Expiry and revocation apply to the next request. Your account must remain verified and enabled.

FROM REQUEST TO LEASE

Build your first integration.

cURL · Python · Node.js

Check your wallet, discover an available plan, create a quote, then confirm the purchase. Quotes last five minutes and do not reserve inventory. Treat px_ and q_ IDs as opaque, case-sensitive strings.

  1. 1Check wallet
  2. 2Find inventory
  3. 3Create quote
  4. 4Buy lease
# cURL · review your price ceiling before purchasing.
export PREPROX_API_BASE='https://preprox.com/api/v1/marketplace'
export PREPROX_API_KEY='YOUR_PREPROX_API_KEY'

# 1. Check the wallet that will pay for this lease.
curl --fail-with-body "$PREPROX_API_BASE/account" \
  -H "Authorization: Bearer $PREPROX_API_KEY" \
  -H 'Accept: application/json'

# 2. Discover inventory and copy one available shared plan's px_ ID.
curl --fail-with-body --get "$PREPROX_API_BASE/proxies" \
  -H "Authorization: Bearer $PREPROX_API_KEY" \
  -H 'Accept: application/json' \
  --data-urlencode 'country=US' --data-urlencode 'plan=shared'

# 3. Replace the placeholder with that complete inventory ID.
curl --fail-with-body "$PREPROX_API_BASE/quotes" \
  -H "Authorization: Bearer $PREPROX_API_KEY" \
  -H 'Accept: application/json' -H 'Content-Type: application/json' \
  -d '{"proxy_id":"px_YOUR_INVENTORY_ID","plan":"shared"}'

# 4. This call PURCHASES a lease. Review the quote before sending.
# Replace the q_ ID. Persist a unique key and this exact body first.
# Retry the SAME body and key if this request times out.
curl --fail-with-body "$PREPROX_API_BASE/leases" \
  -H "Authorization: Bearer $PREPROX_API_KEY" \
  -H 'Accept: application/json' -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: order-YOUR_UNIQUE_ORDER_ID' \
  -d '{"quote_id":"q_YOUR_QUOTE_ID","max_price":"0.42"}'

The final request purchases a real lease. USD 0.42 is an example ceiling, not a published price. Review current quotes and your ceiling first. Python and Node.js use the environment variables shown in the cURL example. Save the purchase body and idempotency key before sending in production.

THE COMPLETE CONTRACT

Endpoint reference.

11 endpoints

All paths are relative to the base URL and require a bearer key. JSON responses use a data envelope. Expand an endpoint for parameters and response details.

GET/accountAccount & wallet

Account & wallet

marketplace:read

Read your account ID, name, email, and current USD wallet balance. Your API key always acts on the account that created it.

Parameters

No parameters.

200 · data: id, name, email, wallet_balance (decimal string), currency.
Download the full response schema
GET/proxiesBrowse proxy inventory

Browse proxy inventory

marketplace:read

Find available shared and private static marketplace proxy plans: 24-hour lease periods with unlimited bandwidth, subject to the acceptable-use policy. Mobile and WiFi availability varies. Prices are PreProx customer prices. Inventory masks IPs and excludes connection credentials.

Parameters

Query: country (2-letter code), state, city, zip (max 20), isp, connection_type (wifi | cell), plan (shared | private), min_stars (integer 1–5), cursor (opaque numeric string, max 30).

200 · data: proxy array; meta: next_cursor, total. Pass next_cursor unchanged; stop when null.
Download the full response schema
GET/proxies/{proxy_id}Get a proxy

Get a proxy

marketplace:read

Read current details, pricing, and plan availability for an inventory item. Use the complete px_ ID from discovery without parsing or changing it.

Parameters

Path: proxy_id (opaque px_ string).

200 · data: id, masked ip, location, connection_type, stars, plans.
Download the full response schema
POST/quotesCreate a quote

Create a quote

marketplace:write

Get a five-minute quote for a shared or private 24-hour static proxy lease. The five-minute quote expiry is the checkout deadline, not the lease duration. Quotes belong to your account and do not reserve inventory or debit your wallet.

Parameters

Body: proxy_id (required opaque inventory ID), plan (required: shared | private).

EXAMPLE JSON BODY · PLACEHOLDERS
{
    "proxy_id": "px_YOUR_INVENTORY_ID",
    "plan": "shared"
}
201 · data: id (q_), proxy_id, plan, amount, currency, duration_hours, expires_at.
Download the full response schema
POST/leasesPurchase a lease

Purchase a lease

marketplace:write

Purchase one 24-hour static proxy lease using a valid quote and your maximum accepted USD price. Proxy bandwidth is unlimited, subject to the acceptable-use policy. Requires an Idempotency-Key header (8–128 letters, numbers, dots, underscores, colons, or hyphens). Persist the key and body before sending.

Parameters

Body: quote_id (required q_ ID), max_price (required USD decimal, 0.01–999999.99, up to 2 decimal places).

EXAMPLE JSON BODY · PLACEHOLDERS
{
    "quote_id": "q_YOUR_QUOTE_ID",
    "max_price": "0.42"
}
201 · data: owned lease, including private connection details. Idempotency-Replayed identifies a replay.
Download the full response schema
GET/leasesList your leases

List your leases

marketplace:read

List marketplace leases owned by your account. Records show saved status and usage; refresh an individual lease for current reconciliation.

Parameters

Query: status (active | expired | cancelled), page (1–1000000), per_page (1–100, default 20).

200 · data: lease array; meta: page, per_page, total, last_page.
Download the full response schema
GET/leases/{lease_id}Get a lease

Get a lease

marketplace:read

Read an owned lease and its connection credentials. Store and display the response securely.

Parameters

Path: lease_id (numeric ID returned by your purchase).

200 · data: lease with amount, status, expires_at, auto_renew, used_bytes, connection.
Download the full response schema
POST/leases/{lease_id}/refreshRefresh a lease

Refresh a lease

marketplace:write

Reconcile current usage, status, expiry, and any observed renewal. Renewals authorized by auto-renew can debit your wallet during reconciliation.

Parameters

Path: lease_id (owned numeric ID). No body required.

200 · data: updated lease.
Download the full response schema
PATCH/leases/{lease_id}/auto-renewSet auto-renew

Set auto-renew

marketplace:write

Enable or disable automatic renewal into additional billable 24-hour lease periods. Enabling authorizes future wallet charges. API key expiry does not change the lease period or its auto-renew setting. Any observed renewal already owed is settled before the setting changes; a 402 leaves the setting unchanged.

Parameters

Path: lease_id. Body: enabled (required boolean).

EXAMPLE JSON BODY · PLACEHOLDERS
{
    "enabled": false
}
200 · data: updated lease.
Download the full response schema
PUT/leases/{lease_id}/whitelistSet an allowed IP

Set an allowed IP

marketplace:write

Set the IP address used for IP-based authentication on an owned active lease.

Parameters

Path: lease_id. Body: ip (required valid IPv4 or IPv6 address).

EXAMPLE JSON BODY · PLACEHOLDERS
{
    "ip": "203.0.113.10"
}
200 · data: updated lease and connection.whitelist_ip.
Download the full response schema
DELETE/leases/{lease_id}Cancel & request a refund

Cancel & request a refund

marketplace:write

Request a wallet refund for an active, unused lease with confirmed eligibility. Current usage must be verified. Repeating a successful cancellation does not credit your wallet twice. If refund_pending is returned, contact support for reconciliation.

Parameters

Path: lease_id (owned numeric ID). No body required.

200 · data: cancelled lease after a confirmed refund. Eligibility is checked at request time.
Download the full response schema

Lease responses include connection.host, port, username, password, whitelist_ip, no_auth_host, and no_auth_port. Unavailable fields can be null. Treat these responses as credentials. Timestamps use ISO 8601 UTC.

CLEAR, CONSISTENT BILLING

Your PreProx prices. Your existing wallet.

The API uses the same PreProx marketplace selling prices and pricing rules as the website. Your account’s USD wallet pays per 24-hour lease, with unlimited proxy bandwidth during that lease under the acceptable-use policy. There is no per-GB billing for these leases. The quote’s amount is your customer price.

PRICE PROTECTION

You set the ceiling.

max_price is the most you authorize for the purchase. Checkout will not charge above your ceiling or the confirmed quote. If pricing changes or inventory disappears, resolve the error and request a fresh quote.

CurrencyUSD / lease
Lease duration24 hours
BandwidthUnlimited
Quote validity5 minutes

Use decimal arithmetic for money. Auto-renew authorizes future wallet charges; maintain sufficient funds or disable renewal before expiry. Refunds require current, confirmed eligibility and credit the wallet once. An unused lease is not a guarantee of a refund.

RELIABLE IN PRODUCTION

Retry with confidence.

Every purchase requires an Idempotency-Key. Create one unique key per intended purchase and persist it with the exact JSON body before sending. A retry with the same account, key, and body returns the original lease without a second debit, with Idempotency-Replayed: true. A changed body returns 409.

After a timeout

Retry the original body with the same purchase key. A new key represents a new purchase.

Pending or uncertain

For purchase_pending or purchase_uncertain, keep the key and contact support before submitting another purchase.

60requests / minute / key
10mutations / minute / key

All your keys also share an account limit of 60 requests and 10 mutations per minute. IP limits apply before authentication. Follow Retry-After on a 429. Never automatically retry a failed purchase with a new key.

Use X-RateLimit-Limit and X-RateLimit-Remaining to pace a key. X-RateLimit-Account-Limit and X-RateLimit-Account-Remaining show the account-wide request allowance. Fix authorization, validation, balance, and quote errors before retrying. A failed insufficient-balance attempt requires wallet funding, a fresh quote, and a new purchase key after resolving that attempt.

CLEAR ERRORS. FASTER RESOLUTION.

Know what to do next.

Errors return a consistent JSON envelope. Validation failures include field details. Keep the X-Request-ID header or request_id when contacting support.

{
    "error": {
        "code": "validation_failed",
        "message": "The request parameters are invalid.",
        "details": {
            "plan": [
                "The selected plan is invalid."
            ]
        }
    },
    "request_id": "YOUR_REQUEST_ID"
}
HTTPMeaningNext step
401Invalid, expired, or revoked keyCheck your key or create a replacement.
402Insufficient wallet balanceFund your wallet and resolve the failed attempt.
403Missing scope or unavailable accountCheck permissions and account eligibility.
404Resource not foundCheck the ID and that you own the lease.
409Quote, purchase, or refund conflictRead the error code; reconcile uncertain purchases.
422Invalid request fieldsCorrect the fields or idempotency header.
429Rate limit reachedWait for Retry-After before retrying.
502Operation temporarily unavailableRetry safely; preserve the original purchase key.
503API access is pausedTry later or contact support.

Building something? We’re here to help.

Share your request ID and a redacted description. Keep API keys and connection passwords private.

Contact support

Find Your Next Proxy with AI

Meet the upgraded Ask Prox AI. Tell us your preferred country, state, city, or ZIP code to find matching proxies faster. Need help? Ask Prox AI

Find My Proxy