Skip to main content
Use code WELCOME10 for 10% off.

SP5 Reseller API

REST API for eligible SP5 customers. Register, verify your email, accept the Terms and AUP, activate instantly, create a key, and add balance. Purchases use your SP5 account balance. Learn about the program or activate from your dashboard.

Base URL & Authentication

https://sp5proxies.com/api/v1/reseller

All requests must use HTTPS and include your API key using either header:

Authorization: Bearer sp5_live_example_key
# or
X-API-Key: sp5_live_example_key
  • Keys are created in your dashboard after self-service activation. The secret is shown exactly once — store it securely (environment variable or secret manager).
  • Never embed the key in client-side code, mobile apps, or public repositories.
  • Rotate the key immediately from your dashboard if you suspect it leaked.
  • Each key has scopes; requests without the required scope return SCOPE_NOT_GRANTED.

Endpoints

GET
/statusAPI status check (authenticated). (scope: —)
GET
/accountYour reseller account summary. (scope: balance:read)
GET
/balanceYour current SP5 balance. (scope: balance:read)
GET
/usage30-day API usage and spend summary. (scope: balance:read)
GET
/packagesList purchasable packages with your prices. (scope: packages:read)
GET
/packages/{packageId}/countriesAvailable countries for a package. (scope: locations:read)
GET
/packages/{packageId}/countries/{countryId}/citiesAvailable cities in a country. (scope: locations:read)
GET
/packages/{packageId}/cities/{cityId}/providersAvailable service providers in a city. (scope: locations:read)
GET
/availabilityLive location availability overview. (scope: locations:read)
GET
/packages/{packageId}/parent-proxiesDetailed location configurations (technology, HTTP/SOCKS ports, rotation). Optional filters: countryId, cityId, serviceProviderId. (scope: locations:read)
GET
/proxiesList your proxies. (scope: proxies:read)
GET
/proxies/{id}Get one proxy by its SP5 ID. (scope: proxies:read)
GET
/proxies/{id}/locationsAvailable location-switch options for one of your proxies, with full details. (scope: locations:read)
POST
/proxies
billable · Idempotency-Key
Purchase a proxy. Requires Idempotency-Key header. (scope: proxies:create)
GET
/proxies/{id}/renewal-optionsRenewal options and prices for a proxy. (scope: proxies:renew)
POST
/proxies/{id}/renew
billable · Idempotency-Key
Renew a proxy. Requires Idempotency-Key header. (scope: proxies:renew)
PUT
/proxies/{id}Change proxy location where supported. Free of charge — no Idempotency-Key needed (it shares the 10 requests/minute limit of purchase/renew). (scope: proxies:update)
POST
/proxies/{id}/reportReport a problem with a proxy. (scope: proxies:report)
GET
/proxies/{id}/allowed-ipsList allowed IPs (IP-auth / Injection packages). (scope: proxies:read)
POST
/proxies/{id}/allowed-ipsAdd an allowed IP. (scope: proxies:update)
DELETE
/proxies/{id}/allowed-ips/{ip}Remove an allowed IP. (scope: proxies:update)
GET
/resi/tariffsResidential GB plans with your prices. (scope: packages:read)
GET
/resi/countriesResidential countries (200+). (scope: locations:read)
GET
/resi/regions?country=EGStates/regions of a country. (scope: locations:read)
GET
/resi/cities?country=EG&region=CairoCities of a region for exact targeting. (scope: locations:read)
GET
/resi/packagesYour residential GB packages with live traffic usage. (scope: proxies:read)
POST
/resi/packages
billable · Idempotency-Key
Buy a residential GB package. Requires Idempotency-Key header. (scope: proxies:create)
GET
/resi/packages/{id}/proxiesProxies inside one of your GB packages. (scope: proxies:read)
POST
/resi/packages/{id}/proxies
billable · Idempotency-Key
Create a residential proxy (country, optional region/city, rotation). Requires Idempotency-Key header. (scope: proxies:create)
POST
/resi/packages/{id}/cancel
billable · Idempotency-Key
Cancel an unused GB package; price is refunded to your balance. (scope: proxies:update)
PATCH
/resi/packages/{id}Rename a GB package (1-40 chars: letters, numbers, spaces, _ - . ,). (scope: proxies:update)
PATCH
/resi/proxies/{proxyId}Change proxy rotation (-1 sticky, 0 every request, 60, 600, 3600). (scope: proxies:update)
DELETE
/resi/proxies/{proxyId}Delete a proxy (not the last one in its package). (scope: proxies:update)

Location Details & Switching

GET /packages/{packageId}/parent-proxies lists the concrete proxy configurations for a package with full connection identity — use it to show your customers the same detail as the SP5 bots (e.g. United States • California • 5G • H:7001 • S:7001 • 15m). Optional query filters: countryId, cityId, serviceProviderId.

GET /proxies/{id}/locations is a shortcut that returns only the currently available configurations for one of your proxies, ready to present as switch options.

Response of /proxies/{id}/locations (the /parent-proxies endpoint returns a plain array of the same entries):

{
  "count": 1,
  "locations": [
    {
      "id": 4477,                  // pass as parentProxyId in PUT /proxies/{id}
      "country_name": "united states",
      "city_name": "california",
      "technology": "5G",
      "http_port": 7001,
      "socks_port": 7001,
      "rotation_time": 15,         // minutes
      "is_available": true,
      "status": "active",
      "usage": 3,
      "service_provider_city_id": 12
    }
  ]
}

To switch, pass the entry's id as parentProxyId in PUT /proxies/{id}. Ports are relay connection ports; upstream provider identity, IPs and credentials are never exposed.

Idempotency & Billing Safety

Billable requests (purchase, renew) require a unique Idempotency-Key header (8–200 characters, e.g. a UUID per order).

  • Retrying with the same key and body returns the original result — you are never charged twice.
  • Reusing a key with a different body returns IDEMPOTENCY_KEY_REUSED.
  • If provisioning fails upstream, your balance is refunded automatically and the key can be retried.
  • Every charge is recorded in your transaction history with balance before/after.

Rate Limits

Read endpoints: 120 requests/minute per key.

Billable endpoints (purchase/renew): 10 requests/minute per key. Location changes (PUT /proxies/{id}) are free of charge and need no Idempotency-Key, but share this same 10 requests/minute tier.

Repeated authentication failures temporarily block the source IP. On 429, back off and retry after a delay.

Error Codes

Errors return JSON: { "code": "...", "message": "..." } with an appropriate HTTP status.

INSUFFICIENT_BALANCEBalance is too low for this purchase. Top up your account and retry.
PACKAGE_NOT_AVAILABLEThe package does not exist or is not currently purchasable.
LOCATION_NOT_AVAILABLEThe requested country/city/provider is not currently available.
PROVIDER_TEMPORARILY_UNAVAILABLEUpstream provisioning is temporarily unavailable. Retry later; you were not charged.
PROXY_NOT_FOUNDNo proxy with this ID exists on your account.
INVALID_ALLOWED_IPThe IP address is invalid or not permitted for this package.
RATE_LIMIT_EXCEEDEDToo many requests. Respect the rate limits and retry with backoff.
API_KEY_REVOKEDThis API key was revoked or disabled. Generate a new key from your dashboard.
EMAIL_VERIFICATION_REQUIREDVerify your SP5 account email before activation.
ACCOUNT_SUSPENDEDYour SP5 account is suspended.
TERMS_ACCEPTANCE_REQUIREDAccept the current Terms and AUP before activation.
SECURITY_REVIEW_REQUIREDReseller access requires a security review.
ACCOUNT_BLOCKEDReseller access was suspended by an administrator. Contact support.
ORDER_ALREADY_PROCESSEDThis Idempotency-Key was already used; the original result is returned or still processing.
IDEMPOTENCY_KEY_REQUIREDBillable requests (purchase, renew, residential GB) require a unique Idempotency-Key header. Location changes (PUT /proxies/{id}) do not use an idempotency key.
RESI_PACKAGE_NOT_FOUNDNo residential GB package with this ID exists on your account.
GEO_NOT_AVAILABLEThe requested country/region/city is not available for residential proxies.
RESI_NO_TRAFFIC_LEFTThe GB package has no traffic left.
RESI_LAST_PROXY_IN_PACKAGEThe provider refuses deleting the last proxy in a package — cancel the package instead.
RESI_PROXY_LIMIT_REACHEDThe GB package reached its 20-proxy limit.
SCOPE_NOT_GRANTEDYour API key does not have the scope required for this endpoint.
INTERNAL_PROVIDER_ERRORAn internal error occurred. Contact support with your request time and endpoint.

Code Examples

cURL

# List packages
curl -s https://sp5proxies.com/api/v1/reseller/packages \
  -H "Authorization: Bearer sp5_live_example_key"

# Purchase a proxy (idempotent)
curl -s -X POST https://sp5proxies.com/api/v1/reseller/proxies \
  -H "Authorization: Bearer sp5_live_example_key" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-2026-0001" \
  -d '{"packageId": "PACKAGE_ID", "country": "United States", "protocol": "SOCKS5"}'

# Residential GB: buy a package, then create a city-targeted proxy
curl -s -X POST https://sp5proxies.com/api/v1/reseller/resi/packages \
  -H "Authorization: Bearer sp5_live_example_key" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: resi-order-0001" \
  -d '{"tariffId": 2}'

curl -s -X POST https://sp5proxies.com/api/v1/reseller/resi/packages/RESI_PACKAGE_ID/proxies \
  -H "Authorization: Bearer sp5_live_example_key" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: resi-px-0001" \
  -d '{"country": "EG", "region": "Cairo Governorate", "city": "Cairo", "rotation": -1}'

JavaScript / Node.js

const BASE = 'https://sp5proxies.com/api/v1/reseller';
const KEY = process.env.SP5_API_KEY; // never hardcode your key

async function api(path, options = {}) {
  const res = await fetch(BASE + path, {
    ...options,
    headers: {
      Authorization: `Bearer ${KEY}`,
      'Content-Type': 'application/json',
      ...options.headers,
    },
  });
  const data = await res.json();
  if (!res.ok) throw new Error(`${data.code}: ${data.message}`);
  return data;
}

const { balance } = await api('/balance');
const purchase = await api('/proxies', {
  method: 'POST',
  headers: { 'Idempotency-Key': crypto.randomUUID() },
  body: JSON.stringify({ packageId: 'PACKAGE_ID', protocol: 'SOCKS5' }),
});

Python

import os, uuid, requests

BASE = "https://sp5proxies.com/api/v1/reseller"
HEADERS = {"Authorization": f"Bearer {os.environ['SP5_API_KEY']}"}

balance = requests.get(f"{BASE}/balance", headers=HEADERS).json()

purchase = requests.post(
    f"{BASE}/proxies",
    headers={**HEADERS, "Idempotency-Key": str(uuid.uuid4())},
    json={"packageId": "PACKAGE_ID", "protocol": "SOCKS5"},
).json()

PHP

<?php
$base = 'https://sp5proxies.com/api/v1/reseller';
$key = getenv('SP5_API_KEY'); // never hardcode your key

function sp5(string $method, string $path, ?array $body = null, array $extra = []) {
    global $base, $key;
    $ch = curl_init($base . $path);
    $headers = array_merge(["Authorization: Bearer $key", 'Content-Type: application/json'], $extra);
    curl_setopt_array($ch, [
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_CUSTOMREQUEST => $method,
        CURLOPT_HTTPHEADER => $headers,
        CURLOPT_POSTFIELDS => $body ? json_encode($body) : null,
    ]);
    return json_decode(curl_exec($ch), true);
}

$balance = sp5('GET', '/balance');
$purchase = sp5('POST', '/proxies',
    ['packageId' => 'PACKAGE_ID', 'protocol' => 'SOCKS5'],
    ['Idempotency-Key: ' . bin2hex(random_bytes(16))]);

Support

Stuck? Open a ticket from your dashboard with the endpoint, timestamp, and error code. Never share your API secret — support will never ask for it.

Ready when you are

Give your next workflow a cleaner connection path.

Start with a trial, compare packages, or speak with support before you purchase.

Share this page