--- url: https://proxykite.com/docs/guide/setup.md --- > For AI agents: the complete documentation index is available at https://proxykite.com/docs/llms.txt, the full documentation bundle is available at https://proxykite.com/docs/llms-full.txt. # Set up your box, step by step This page takes you from "I just paid" to "my proxies work". It takes about 10 minutes. ProxyKite is software: the 4G dongles, the SIM cards and the box they plug into are yours. ## What you need | Item | Details | | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | A Linux box | Raspberry Pi 4 or 5, a mini PC, an old laptop, or a [Proxmox VM](https://proxykite.com/docs/guide/proxmox.md). Debian, Ubuntu or Raspberry Pi OS. CPU: 64-bit Intel/AMD, arm64 or armv7. 1 GB RAM is enough. | | Internet on the box | Normal broadband by cable or Wi-Fi. The box only makes outgoing connections, so you do **not** need a static IP or port forwarding. | | 4G dongles | [Huawei E3372 (HiLink) or ZTE MF833T](https://proxykite.com/docs/guide/supported-dongles.md). One dongle = one proxy. | | SIM cards | One per dongle, with an active data pack. Test each SIM in a phone first. | | A powered USB hub | Needed for more than 2 dongles. Dongles draw a lot of power; an unpowered hub makes them drop off. | | Your licence key | Looks like `XXXX-XXXX-XXXX-XXXX`. It is shown right after payment and any time under **Nodes** in the panel. | One licence is for one box. The number of dongles on that box is the number you paid for. ## Step 1. Prepare the dongles 1. Put a SIM into each dongle. If the SIM has a PIN lock, remove the PIN first (put it in a phone and switch the SIM lock off). 2. Plug the dongles into the box, or into the powered hub that is plugged into the box. 3. Wait about one minute until the light on each dongle is steady. ## Step 2. Open a terminal on the box Sit at the box, or connect over SSH from your computer: ```bash ssh youruser@192.168.1.50 # use your box's own address ``` Check that the box can see the dongles: ```bash lsusb | grep -i -E "huawei|zte" # Bus 001 Device 004: ID 12d1:14dc Huawei Technologies Co., Ltd. E3372 LTE/UMTS/GSM HiLink Modem/Networkcard ``` You should see one line per dongle. If `lsusb` is missing, install it with `sudo apt-get install -y usbutils`. ## Step 3. Run the install command Copy the install command from the page shown after payment, or from **Nodes** in the panel. It already contains your licence key. Paste it into the terminal and press Enter: ```bash curl -fsSL https://proxykite.com/install.sh | sudo bash -s -- --key XXXX-XXXX-XXXX-XXXX ``` The installer downloads the ProxyKite agent, verifies its checksum, registers the box with your account and starts it as a service that also starts after every reboot. When it finishes it prints: ```text Done. Check with: hostyourproxy status ``` ## Step 4. Check that it works on the box ```bash sudo hostyourproxy status ``` You should see `Tunnel: connected`, a recent `Last OK heartbeat`, and one line per dongle under `Dongles:`. A dongle needs about 30 seconds after the install before it shows up. ## Step 5. Get your proxies from the panel 1. Sign in at [proxykite.com](https://proxykite.com/login) and open **Proxies**. 2. Each dongle is listed with its **host**, **port**, **username**, **password** and its own **rotation link**. 3. Test one from any computer (replace the values with yours): ```bash curl -x http://USER:PASS@HOST:PORT https://api.ipify.org # prints the public IP of that SIM ``` The same port works for HTTP and SOCKS5. Ready-made strings for browsers and tools are on [Proxy formats](https://proxykite.com/docs/guide/proxy-formats.md). ## Step 6. Change the IP Press **Rotate IP** on the proxy page, or open the proxy's rotation link, then run the curl test again: the IP has changed. A rotation takes about 10 to 30 seconds depending on the dongle. See [Rotation links](https://proxykite.com/docs/guide/rotation-links.md). ## If something does not work | What you see | What to do | | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `error: pass your licence key` | The key is missing or mistyped. Copy the whole command again from **Nodes**. | | `error: run as root` | Keep the `sudo` in the command, exactly as copied. | | `checksum mismatch` or `download failed` | Wait one minute and run the command again. | | `unsupported CPU` | The box is not amd64, arm64 or armv7. Use another box. | | No dongle under `Dongles:` after 1 minute | Run `lsusb`. No line for the dongle: try another USB port or a powered hub. A Huawei shown as `12d1:1f01` or a ZTE shown as `19d2:1225` is still in storage mode: run `sudo apt-get install -y usb-modeswitch`, then unplug and plug the dongle. | | The proxy is listed but shows **No internet** | The SIM has no data. Check the data pack and balance; a SIM that only opens the carrier's recharge page counts as no data. | | The proxy answers `503` with `no-mobile-data` | The dongle has just started or is rotating. Wait 10 seconds and try again. | | The proxy answers `407` | Wrong username or password. After 20 wrong tries in 10 minutes that address is blocked for 15 minutes. | | The box shows **offline** in the panel | Check the box has internet (`ping -c 3 proxykite.com`), then `sudo systemctl restart hostyourproxy`. | | Dongles disappear and come back | Almost always USB power. Use a powered hub and a good power supply for the box. | To see what the agent is doing, live: ```bash sudo journalctl -fu hostyourproxy ``` ## Everyday commands | Task | Command | | ----------------------------- | -------------------------------------------- | | Status | `sudo hostyourproxy status` | | Restart the agent | `sudo systemctl restart hostyourproxy` | | Update to the newest agent | Run the install command from **Nodes** again | | Remove the agent from the box | `sudo hostyourproxy uninstall` | Adding a dongle later needs no command: plug it in and it appears under **Proxies** within about 30 seconds, as long as your licence covers it. To move your licence to a new box, click **Release machine** on the node page, then run the install command on the new box. ## Need help Write to [support@proxykite.com](mailto:support@proxykite.com) with the output of `sudo hostyourproxy status`, and we will look at it with you. --- url: https://proxykite.com/docs/guide/getting-started.md --- > For AI agents: the complete documentation index is available at https://proxykite.com/docs/llms.txt, the full documentation bundle is available at https://proxykite.com/docs/llms-full.txt. # Getting started The ProxyKite API lets your own scripts do what you do in the panel: list your proxies, rotate their IPs, change passwords and whitelists, and read usage, SMS and rotation history. Which 4G sticks work (Huawei E3372 HiLink, ZTE MF833T) is on [Supported dongles](https://proxykite.com/docs/guide/supported-dongles.md). ## 1. Create an API token 1. Sign in to the panel at [proxykite.com](https://proxykite.com/). 2. Open **API tokens** in the left menu. 3. Give the token a name (for example `my-scraper`), pick its **access level** (`read`, `rotate` or `manage` (see [Authentication & abilities](https://proxykite.com/docs/guide/authentication.md)), and optionally an expiry in days. 4. Click **Create** and copy the token now. **It is shown only once.** It looks like `12|AbCdEf…`. Store it in an environment variable rather than in your code: ```bash export HYP_TOKEN='12|AbCdEf...' ``` Revoke a token at any time on the same page; it stops working immediately. ## 2. Base URL and headers | | | | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------- | | Base URL | `https://proxykite.com/api/v1` | | Auth header | `Authorization: Bearer ` | | Request body | JSON, with `Content-Type: application/json` | | Responses | JSON (`Accept: application/json` recommended). Exception: [`/export`](https://proxykite.com/docs/api/export.md) returns plain text or CSV | | Times | ISO 8601 in UTC, for example `2026-10-09T18:00:00+00:00` | Successful responses wrap their payload in a `data` key: ```json {"data": {"id": 7, "label": "Shop A", "port": 30007, "...": "..."}} ``` The one exception is [`POST /proxies/{id}/rotate`](https://proxykite.com/docs/api/rotation.md), which answers with a flat `{"ok": true, "old_ip": "…", "new_ip": "…"}` object. ## 3. Your first request Check that the token works with [`GET /me`](https://proxykite.com/docs/api/account.md). Every endpoint page has the same example in four languages: **curl**, **Python** (`requests`), **Node.js** (18+, built-in `fetch`; save as `.mjs` for top-level `await`) and **PHP** (curl extension). All of them read the token from the `HYP_TOKEN` environment variable. **curl** ```bash curl 'https://proxykite.com/api/v1/me' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' ``` **Python** ```python import os import requests r = requests.get( "https://proxykite.com/api/v1/me", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/me', { headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', }, signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', ], ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` Then list your proxies with [`GET /proxies`](https://proxykite.com/docs/api/proxies.md) and rotate one with [`POST /proxies/{id}/rotate`](https://proxykite.com/docs/api/rotation.md). ## Rate limits - **120 requests per minute per login** across all of that login's tokens. Over the limit you get `429 rate_limited` with a `Retry-After` header (seconds). - Rotation links (`/r/{token}`, no API token) have their own limits: 6 per minute per link and 30 per minute per client IP. - A rotation takes up to about 60 seconds; a second rotation of the same proxy while one is running answers `409 rotation_in_progress`. ## Errors Every error is JSON with a machine-readable `error` code and a human `message`, and the HTTP status matches: ```json {"error": "insufficient_ability", "message": "This API token lacks the 'manage' ability."} ``` Validation errors (`422`) also list the bad fields: ```json {"error": "validation_failed", "message": "Range too wide: the smallest allowed prefix is /16.", "fields": {"cidr": ["Range too wide: the smallest allowed prefix is /16."]}} ``` The full list of codes is on [Errors & rate limits](https://proxykite.com/docs/guide/errors.md). --- url: https://proxykite.com/docs/api/account.md --- > For AI agents: the complete documentation index is available at https://proxykite.com/docs/llms.txt, the full documentation bundle is available at https://proxykite.com/docs/llms-full.txt. # Account ## Who am I `GET /me` **Ability:** `read` Returns the login that owns the token, the account it belongs to and the token's abilities. Handy as a "does my token work" check. **curl** ```bash curl 'https://proxykite.com/api/v1/me' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' ``` **Python** ```python import os import requests r = requests.get( "https://proxykite.com/api/v1/me", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/me', { headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', }, signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', ], ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `200`** ```json {"data": { "id": 15, "name": "Alice", "email": "alice@example.com", "role": "customer", "team_role": null, "account_id": 15, "abilities": ["rotate"] }} ``` | Field | Meaning | | --------------------- | ------------------------------------------------------------------------------------------------------ | | `id`, `name`, `email` | the login | | `role` | `customer` for an account owner, `subuser` for team members and reseller sub-users (`admin` for staff) | | `team_role` | `null` for the account owner and reseller sub-users; `admin` or `viewer` for team members | | `account_id` | id of the account owner (same as `id` for the owner) | | `abilities` | the token's level: `["read"]`, `["rotate"]` or `["manage"]` | --- url: https://proxykite.com/docs/changelog.md --- > For AI agents: the complete documentation index is available at https://proxykite.com/docs/llms.txt, the full documentation bundle is available at https://proxykite.com/docs/llms-full.txt. # Changelog Changes to the customer API, rotation links and webhooks. Newest first. Additive changes (new fields, new endpoints) do not change the `/api/v1` prefix; breaking changes would get a new version. ## 2026-11-23 - **API tokens and webhooks need an active licence.** An account without one cannot create tokens or webhooks; existing tokens answer `403 licence_required` and webhooks pause until a licence is active again. Nothing is deleted. See [Authentication](https://proxykite.com/docs/guide/authentication.md). - **Send SMS from any number.** New [`POST /sms`](https://proxykite.com/docs/api/sms.md#send-from-any-number): one call for all your numbers. ProxyKite picks a proxy that still has room in its SMS limits, spreads sends evenly and skips a number that is full, offline or busy. [`GET /sms/senders`](https://proxykite.com/docs/api/sms.md#list-the-sending-numbers) lists the numbers with today's usage. - **Per-day SMS limit on the SMS tab.** The proxy page → **SMS** tab now has "SMS limit per day" next to the send form (week and month limits stay under Limits). ## 2026-11-15 - **Internet check through every dongle.** The agent (1.13.0) fetches the public IP through each dongle about once a minute (every 20 s while it fails). A dongle that is plugged in and answering on USB but cannot reach the internet (SIM out of data or balance, carrier session dropped) now shows **No internet** in the panel instead of "online", and the dashboard lists such proxies at the top. New alert `dongle_no_internet` (same delay as offline alerts; recovery is `dongle_online`). API: the proxy object has `state` / `state_reason` (one answer to "is it working, and if not why") and `internet` `{ok, error, checked_at, since}`. Needs agent 1.13.0 on your box; older agents keep working without the check. - **Uptime history per proxy.** New **Uptime** tab on the proxy page: a 24 h / 7 d / 30 d strip, every downtime coloured by cause (no internet, stalled, unplugged, node offline, no data, disabled or limits), with a table of incidents. API: [`GET /proxies/{id}/uptime`](https://proxykite.com/docs/api/usage.md#uptime). History starts 2026-11-15. ## 2026-11-14 - **Docs:** the [rotation link](https://proxykite.com/docs/guide/rotation-links.md) page now says what the link has done since 2026-10-13: a plain `GET` (or `POST`) rotates straight away, only `HEAD` does not. `?confirm=1` is ignored and `400 confirm_required` is no longer sent. Use the link's IP allow list to keep others out. - **Docs:** new page [Supported dongles](https://proxykite.com/docs/guide/supported-dongles.md): Huawei E3372 (HiLink firmware) and ZTE MF833T (agent 1.10.0 or newer), what each one can do and how long a rotation takes (ZTE: roughly 10 to 30 s). - **Docs:** the [Proxmox guide](https://proxykite.com/docs/guide/proxmox.md#two-or-more-huawei-e3372-sticks) now warns cloud-init users with two or more Huawei E3372 sticks: a second stick can take the VM's own `eth0` name at boot and the box drops off the panel. The guide shows how to rename the LAN card to `lan0` and turn off cloud-init's network config before plugging in the second stick. ## 2026-10-27 - **New dongle type: ZTE MF833T** (and ZTE sticks with the same web API). Plug it into your box like a Huawei stick; the agent (1.10.0) detects it, gives it a proxy port and controls it: rotation (a network-mode toggle gives a new IP in 10 to 28 s, bound by the modem; data reconnect and reboot as fallbacks), SMS inbox/send/delete, network mode (`options` in `GET /proxies/{id}/network-mode` are the device's own values, e.g. `NETWORK_auto`, `Only_LTE`), LAN settings and the dongle's own web UI. API: `device.type` can be `zte`, `device.control_via` is `agent` for such devices. Needs agent 1.10.0 (update with the usual install command). The panel shows a "cloud router update" notice until our router runs 1.8.0. - **Rotation always goes the whole way now.** Some carriers (we saw it on Vi and BSNL in India) keep the same public IP after a new data session, so a network-mode switch or data reconnect ends with "exit IP unchanged". Rotations from the link, the API and the panel button now continue to a reboot of the stick instead of giving up after 50 s. A rotation on such a SIM can take up to about 2.5 minutes, but ends with a new IP. The panel also remembers which methods keep failing on a given proxy and tries the working one first the next time (a reboot-only SIM rotates in \~70 s). The `/r/` link and `POST /proxies/{id}/rotate` block until the rotation is done, so give your client a 180 s timeout. - **Fix:** the network-mode quick menu on the proxies list offered Huawei mode codes to ZTE sticks ("does not offer network mode 03"). It now lists the device's own modes. - **Agent 1.10.6: ZTE network-mode rotation disconnects first.** The stick now disconnects mobile data, flips the network mode and reconnects, in that order (what the dongle's own web UI does), instead of changing the mode on a live data session and waiting for the modem to drop it. On our ZTE on Vi that waiting was 10–11 s some afternoons; the disconnect takes about a second. A full IP rotation on this stick went from about 26–28 s to about 20–23 s. The rest is the modem re-attaching to the network, which it does on its own schedule. Update with the usual install command. - **Agent 1.10.5: shorter rotations on agent-controlled dongles (ZTE).** The box now reads the exit IP through the stick itself right before and right after the change, so the panel no longer spends 2–4 s on its own pre-check and notices the new IP the moment the stick passes traffic; a stick that re-connects with the same public IP (sticky CGNAT) is recognised in about a second and the next method starts at once. The rotation log (`agent.rotation`) now carries phase timings. Measured on our ZTE on Vi: the modem itself needs 1–11 s to drop the old session and 3–7 s to re-attach, so a netmode rotation takes roughly 12–25 s depending on the modem and the carrier; the software part is now about 3 s of that. Update with the usual install command. - **Agent 1.10.3: faster network-mode change.** Changing the network mode of an agent-controlled dongle (ZTE) from the panel or `PUT /proxies/{id}/network-mode` is now one round trip to the box instead of three, and the agent no longer waits a fixed second before reading the mode back. Measured on our ZTE: the dashboard change answered in 5.2 s before and about 2 s now; the live read on the Connection tab 3.3 s → about 1.5 s. The modem itself still takes 3–10 s to re-register on the new mode, which the card now says. Update with the usual install command. - **Agent 1.10.2: faster ZTE rotation.** The network-mode rotation on ZTE sticks is now a one-way flip (Automatic → 4G only, the next rotation back), like on Huawei sticks; the mode is no longer switched back afterwards. The agent also tells the panel whether the stick got a new data session, so a rotation that cannot have changed the IP moves on to the next method after about a second instead of waiting 10 s. Update with the usual install command. ## 2026-10-21 - **Docs:** new guide [Proxmox VE + USB dongles](https://proxykite.com/docs/guide/proxmox.md): run the agent in a Proxmox VM with the stick passed through by USB port; the exact commands and timings from our own host. - **Agent 1.9.2:** fixes an agent bug (since 1.8.x) where a dongle interface in _system_ addressing could lose and regain its IPv4 address every few seconds after a reboot, failing most requests on that proxy. Update with the usual install command. - **New:** `POST /nodes/{id}/reboot` reboots the whole box (owner or team admin; the panel's node page has a **Reboot box** button). Needs agent 1.9.1 on the box and the box online; 5 calls per 10 minutes. - **SMS inbox:** `GET /proxies/{id}/sms` is paged and sortable (`page`, `per_page`, `sort=newest|oldest`) and returns `meta`; `limit` still works. **New:** `DELETE /proxies/{id}/sms` (`ids` or `all`) removes saved messages from the panel; `POST /proxies/{id}/sms/sync` copies the dongle's inbox now and, with `delete_from_dongle: true`, frees the dongle's storage after saving. The panel's SMS tab has the same: pages, sort, delete selected / all, Sync now, Fetch all & delete. - **New:** `stalled`, `stalled_reason` and `stalled_since` on the proxy object. `stalled: true` means the box still sees the dongle's USB link up but the dongle itself no longer answers (the proxy passes no traffic although `status` is `online`). Needs agent 1.9.1 on the box; older agents report `stalled: false`. - **New alert type:** `dongle_stalled` (on by default, same "offline after N minutes" delay as `dongle_offline`; the recovery is the usual `dongle_online`). Fix on the box: unplug and replug the stick, or reboot the box; avoid unpowered USB hubs. ## 2026-10-10 - **New:** `GET` / `PUT /nodes/{id}/uplink`: choose how the box reaches our server (Ethernet only, Ethernet with backup dongles, or dongles only) and see which link it uses now. Node object gains `uplink`. New alert types `uplink_backup`, `uplink_primary`, `uplink_none`. Needs agent 1.7.0. See [Tunnel uplink](https://proxykite.com/docs/api/tunnel-uplink.md). - **New:** `GET` / `PUT /proxies/{id}/network-mode`: read the dongle's network mode live (plus what network it is on now, e.g. `EDGE` / `LTE`) and switch it to 4G only, 3G only, 2G only, Auto or a combo the dongle offers. Capability `netmode.set` is now `yes` on HiLink dongles. See [Network mode](https://proxykite.com/docs/api/network-mode.md). - **New:** `data_connection` (`connected` / `disconnected` / `unknown`) and `data_connection_reason` on the proxy object and the interface object: whether the device has mobile data, separate from `status`. See [the proxy object](https://proxykite.com/docs/api/proxies.md#the-proxy-object). - **New** interface fields: `lan` (agent ≥ 1.6.0), `lan_mismatch`, `apn`, `warnings.shared_address`, `warnings.possible_duplicate_of`. See [the interface object](https://proxykite.com/docs/api/interfaces.md#the-interface-object). - **New:** `PATCH /proxies/{id}/interface/apn` sets the APN for devices with the new capability `data_connect` (USB modems, agent ≥ 1.6.0). See [Set the APN](https://proxykite.com/docs/api/interfaces.md#set-the-apn). - **New:** `GET /nodes`, `GET /nodes/{id}`, `PATCH /nodes/{id}` (name and location) and the node object (`display_name`, `location`, `isp`, `public_ip`, …). Proxy `node` gains `name`, `display_name`, `country_code`, `city`; proxies gain `country_code` and `isp` of the exit IP. See [Nodes](https://proxykite.com/docs/api/nodes.md). - **New:** traffic insights per proxy (off by default; agent ≥ 1.5.0): `traffic` object on every proxy, `PATCH /proxies/{id}` `traffic_view` / `traffic_log` / `traffic_retention_days` / `traffic_sni`, `GET /proxies/{id}/traffic`, `…/traffic/top`, `…/traffic/recent`, `POST …/traffic/live-token` (Server-Sent Events), `…/traffic/logs`, `…/traffic/logs/export` (CSV). See [Traffic insights](https://proxykite.com/docs/api/traffic.md). - **New:** every proxy has a `device` object: type (`hilink`, `mm`, `android`, `generic`), model, permanent `uid` and `capabilities` (`yes` / `setup` / `no`). Things a device cannot do answer `409 unsupported`. See [device type and capabilities](https://proxykite.com/docs/api/proxies.md#device-type-and-capabilities). - **New:** `DELETE /proxies/{id}`, `GET /proxies/deleted`, `POST /proxies/{id}/restore`: a deleted proxy frees its port at once and can be restored for 7 days. See [delete and restore](https://proxykite.com/docs/api/proxies.md#delete-and-restore). - **Changed:** the `sim` object belongs to the SIM card (moves with it to another dongle) and gains `id`, `identified`, `iccid_last4`, `sms_limits`. - **New:** proxies can sit on different cloud routers. `host` may be a hostname (`gw-.vpslake.com`) instead of an IP. While a node is scheduled to move to another cloud router, proxies carry `pending_host`, `pending_port` and `switch_at`; webhooks `proxy.address_changing` (before) and `proxy.address_changed` (after). Logins and rotation links do not change. - **New:** SMS and bandwidth limits per proxy (day / week / month): `limits` object on every proxy, `GET /proxies/{id}/limits`, change with `PATCH /proxies/{id}` `{"limits":…}`. New `disabled_reason` `bandwidth_limit`. See [Proxies](https://proxykite.com/docs/api/proxies.md#sms-and-bandwidth-limits). - **New:** `POST /proxies/{id}/sms` sends an SMS from the dongle; `429 sms_limit_reached` when a limit is used up. See [SMS](https://proxykite.com/docs/api/sms.md#send-an-sms). - **Changed:** `PATCH /proxies/{id}` no longer needs `label` when `limits` (or `sim`) is sent. - **New:** [website rules](https://proxykite.com/docs/api/website-rules.md) per proxy: `GET`/`PUT /proxies/{id}/rules` (block list / allow list; needs agent 1.3.0 on the box). - **New:** [ports](https://proxykite.com/docs/api/ports.md): `GET`/`PUT /proxies/{id}/ports`, `GET /proxies/{id}/ports/free`: one port for both protocols (default) or separate HTTP and SOCKS5 ports, numbers of your choice. - **New fields** on the proxy object: `ports` and `site_rules`. `users[].socks5` now uses the SOCKS5 port (the same port unless the proxy is in `split` mode). - **New:** alerts: `GET`/`PATCH /alerts/settings` (email, Telegram, event types, timezone) and `GET /alerts` (history). See [Alerts](https://proxykite.com/docs/api/alerts.md). - **New:** `sim` object on `GET /proxies/{id}` and in `PATCH /proxies/{id}` (phone, operator, plan, next recharge date, reminder). See [Proxies](https://proxykite.com/docs/api/proxies.md#sim-card-and-recharge-date). - **New:** `PATCH /proxies/{id}` renames a proxy (`label`). See [Proxies](https://proxykite.com/docs/api/proxies.md#rename-a-proxy). - **New:** this documentation site at `https://proxykite.com/docs/`. ## 2026-10-09 - **New:** interface management: `GET`/`PATCH /proxies/{id}/interface`, `POST /proxies/{id}/interface/reset`, `GET /nodes/{id}/interfaces`, `POST /nodes/{id}/rescan`. See [Interfaces](https://proxykite.com/docs/api/interfaces.md) and [Nodes](https://proxykite.com/docs/api/nodes.md). - **Changed:** a plain `GET` on a [rotation link](https://proxykite.com/docs/guide/rotation-links.md) no longer rotates. Use `POST`, or `GET` with `?confirm=1`. A plain GET answers `400 confirm_required` (or a page with a **Rotate now** button in a browser). - **Changed:** `POST /proxies/{id}/interface/reset` is refused (`422`) for dongles in `system` mode. - **New:** API v1 launched: proxies, rotation, auto-rotate, passwords, whitelist, usage, SMS, rotation history, export; [webhooks](https://proxykite.com/docs/guide/webhooks.md) with `rotation.completed`, `node.online`, `node.offline`, `quota.exceeded`. --- url: https://proxykite.com/docs/guide/ai-agents.md --- > For AI agents: the complete documentation index is available at https://proxykite.com/docs/llms.txt, the full documentation bundle is available at https://proxykite.com/docs/llms-full.txt. # Use with AI (LLM instructions) Paste the instruction below into ChatGPT, Claude, Gemini, Cursor, Copilot or any other AI agent. It tells the AI where the full ProxyKite documentation is and the rules to follow, so it can write working code against your proxies. Every page of these docs also has a **Copy Markdown** button under its title, and an **Open** menu to open the page in ChatGPT or Claude. ## Main instruction for any LLM ```text title="ProxyKite: instruction for AI agents" wrapCode You are helping me use ProxyKite (https://proxykite.com), a mobile-proxy service: each 4G USB dongle on my own Linux box becomes an HTTP + SOCKS5 proxy reachable on a public host:port, with IP rotation, credentials, whitelists, usage, SMS and webhooks. 1. Read the documentation first, do not guess: - Full docs in one file (read this): https://proxykite.com/docs/llms-full.txt - Index of all pages: https://proxykite.com/docs/llms.txt - Any single page as Markdown: add .md to its URL, e.g. https://proxykite.com/docs/api/proxies.md If you cannot open URLs, ask me to paste llms-full.txt. 2. API basics: - Base URL: https://proxykite.com/api/v1 - Header: Authorization: Bearer (token from the panel, "API tokens"; read it from env var HYP_TOKEN, never hard-code it or print it) - JSON in and out (Content-Type: application/json, Accept: application/json). Success payload is in "data". - Errors: {"error": "", "message": "..."}. Branch on "error", never on "message". - Times are ISO 8601 UTC. 3. Token levels: read (GET only) < rotate (+ POST /proxies/{id}/rotate) < manage (all changes). Suggest the lowest level the task needs. 403 insufficient_ability = token level too low. 403 licence_required = the account has no active licence (do not retry; the user must buy or renew). 4. Limits and retries: - 120 requests/minute per login; rotation links 6/minute per link. On 429 wait Retry-After seconds. - Rotation: 409 rotation_in_progress -> wait a few seconds and retry; 502 rotation_failed -> retry once after ~30 s. - POST /proxies/{id}/password is not idempotent: each call makes a new password. Do not retry it blindly. - GET requests are safe to retry. 5. Rotation links (https://proxykite.com/r/) rotate a proxy's IP with no API token. Treat them as secrets. 6. Webhooks are signed: always verify the signature as shown in the Webhooks page before trusting a payload. 7. Only use endpoints, fields and error codes that appear in the docs. If something is not documented, say so instead of inventing it. Show complete, runnable code with error handling. ``` ## Files for AI tools | File | What it is | | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | | [`/docs/llms.txt`](https://proxykite.com/docs/llms.txt) | Short index: every page with its title and Markdown link | | [`/docs/llms-full.txt`](https://proxykite.com/docs/llms-full.txt) | All pages in one Markdown file, best to give an AI in one go | | `/docs/.md` | Any single page as Markdown, e.g. [`/docs/api/rotation.md`](https://proxykite.com/docs/api/rotation.md) | --- url: https://proxykite.com/docs/api/alerts.md --- > For AI agents: the complete documentation index is available at https://proxykite.com/docs/llms.txt, the full documentation bundle is available at https://proxykite.com/docs/llms-full.txt. # Alerts Email and Telegram messages when a proxy or node needs you: proxy offline / back online, node offline / back online, failed IP rotation, SIM recharge due, SMS send limit reached, bandwidth 80% used / limit reached. Each login has its own settings (the panel page is **Account → Alerts**). Dongle alerts go to the account owner and to the reseller sub-user the proxy is assigned to; node and SIM-recharge alerts go to the owner only. The same alert for the same proxy is sent at most once per 15 minutes (online/offline), 6 hours (limits) or once a day (SIM recharge). All times in the API are UTC (ISO 8601). Your `timezone` only changes how the panel and the alert texts show times, and when SIM reminders go out (about 09:00 your time). ## Get alert settings `GET /alerts/settings` **Ability:** `read` **curl** ```bash curl 'https://proxykite.com/api/v1/alerts/settings' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' ``` **Python** ```python import os import requests r = requests.get( "https://proxykite.com/api/v1/alerts/settings", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/alerts/settings', { headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', }, signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', ], ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `200`** ```json {"data": { "timezone": "Asia/Kolkata", "email": {"enabled": true, "address": "ops@example.com", "verified": false, "sending_to": "you@example.com"}, "telegram": {"available": true, "enabled": true, "chat_id": "123456789"}, "events": {"dongle_offline": true, "dongle_online": true, "dongle_stalled": true, "dongle_no_internet": true, "node_offline": true, "node_online": true, "rotation_failed": false, "recharge_due": true, "sms_limit_reached": true, "bandwidth_warning": true, "bandwidth_limit_reached": true, "uplink_backup": true, "uplink_primary": true, "uplink_none": true}, "offline_after_minutes": 5 }} ``` - `email.address`: where you asked alerts to go; `sending_to`: where they go **now** (your login email until a new address is confirmed with the link we mail to it). - `telegram.available`: `false` while the panel has no Telegram bot configured. ## Change alert settings `PATCH /alerts/settings` **Ability:** `manage` · Send only what you change. Answers with the full settings object (as above). | Field | | | ----------------------- | ------------------------------------------------------------------------------------------------------------- | | `timezone` | IANA name, e.g. `Europe/London` | | `email.enabled` | bool | | `email.address` | email, or `null` / `""` = your login email. A new address gets a confirmation link and is used once confirmed | | `telegram.enabled` | bool (needs a `chat_id`) | | `telegram.chat_id` | your chat id (digits; groups start with `-100`) or `@channelname`; `null` clears it | | `events` | object of event type → bool; types not sent keep their value | | `offline_after_minutes` | 1–1440: how long a proxy/node must be offline before the alert | **curl** ```bash curl -X PATCH 'https://proxykite.com/api/v1/alerts/settings' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d '{"telegram":{"enabled":true,"chat_id":"123456789"},"events":{"rotation_failed":false}}' ``` **Python** ```python import os import requests r = requests.patch( "https://proxykite.com/api/v1/alerts/settings", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, json={"telegram": {"enabled": True, "chat_id": "123456789"}, "events": {"rotation_failed": False}}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/alerts/settings', { method: 'PATCH', headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', 'Content-Type': 'application/json', }, body: JSON.stringify({"telegram":{"enabled":true,"chat_id":"123456789"},"events":{"rotation_failed":false}}), signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_CUSTOMREQUEST => 'PATCH', CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', 'Content-Type: application/json', ], CURLOPT_POSTFIELDS => '{"telegram":{"enabled":true,"chat_id":"123456789"},"events":{"rotation_failed":false}}', ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Finding your Telegram chat id:** open a chat with our bot and send `/start` (the bot replies with your id when the panel's bot webhook is on; otherwise message `@userinfobot`, which replies with your id). You must `/start` our bot once or it is not allowed to write to you. For a group, add the bot to the group and use the group's id. ## Alert history `GET /alerts` **Ability:** `read` · Your last alerts, newest first (kept 90 days). | Query | | | ------- | ----------------- | | `limit` | 1–100, default 50 | **curl** ```bash curl 'https://proxykite.com/api/v1/alerts?limit=20' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' ``` **Python** ```python import os import requests r = requests.get( "https://proxykite.com/api/v1/alerts?limit=20", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/alerts?limit=20', { headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', }, signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', ], ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `200`** ```json {"data": [ {"id": 812, "type": "recharge_due", "title": "SIM recharge due in 3 days, Shop A", "body": "Shop A (port 30000, node rack-1): next recharge date Tue 13 Oct 2026.\n…", "status": "sent", "channels": {"email": "sent", "telegram": "sent"}, "proxy_id": 7, "node_id": 1, "created_at": "2026-10-10T03:31:02+00:00", "sent_at": "2026-10-10T03:31:04+00:00"} ]} ``` `status`: `queued`, `sent`, `partial` (one channel failed), `failed`, or `no_channel` (every channel is switched off, logged only). `type` is one of the event types above, or `test`. ## Related - SIM number and recharge date of a proxy: `sim` in [Proxies](https://proxykite.com/docs/api/proxies.md#sim-card-and-recharge-date). - [Webhooks](https://proxykite.com/docs/guide/webhooks.md): the machine-to-machine way to react to the same changes. --- url: https://proxykite.com/docs/api/credentials.md --- > For AI agents: the complete documentation index is available at https://proxykite.com/docs/llms.txt, the full documentation bundle is available at https://proxykite.com/docs/llms-full.txt. # Credentials Each proxy has one or more proxy users (`users[]` on the [proxy object](https://proxykite.com/docs/api/proxies.md)). This endpoint gives them new, random 16-character passwords. The old password stops working with the node's next config pull (seconds). ## New password `POST /proxies/{id}/password` **Ability:** `manage` · **Who:** anyone on the account except team viewers; sub-users for their assigned proxies. | Body field | Type | | | ---------- | ------ | ------------------------------------------------------------------------- | | `username` | string | optional, only this proxy user; omit to change **all** users of the proxy | **curl** ```bash curl -X POST 'https://proxykite.com/api/v1/proxies/7/password' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d '{"username":"u7abc"}' ``` **Python** ```python import os import requests r = requests.post( "https://proxykite.com/api/v1/proxies/7/password", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, json={"username": "u7abc"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/proxies/7/password', { method: 'POST', headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', 'Content-Type': 'application/json', }, body: JSON.stringify({"username":"u7abc"}), signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', 'Content-Type: application/json', ], CURLOPT_POSTFIELDS => '{"username":"u7abc"}', ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `200`** ```json {"data": [{"username": "u7abc", "password": "Xk3v9QmP2rT8wLzA"}]} ``` `422 validation_failed` (`fields.username`) if the proxy has no user with that name. :::warning Not idempotent Every call creates a new password. Update your tools with the returned value straight away. ::: --- url: https://proxykite.com/docs/api/export.md --- > For AI agents: the complete documentation index is available at https://proxykite.com/docs/llms.txt, the full documentation bundle is available at https://proxykite.com/docs/llms-full.txt. # Export ## All connection strings `GET /export` **Ability:** `read` · One line per proxy user of every proxy your login can see. Answers **plain text** (or CSV), not JSON. | Query `format` | Line format | Content-Type | | -------------------- | ------------------------- | ------------ | | `hostport` (default) | `host:port:user:pass` | `text/plain` | | `hostport_at` | `host:port@user:pass` | `text/plain` | | `userpass` | `user:pass@host:port` | `text/plain` | | `csv` | header + one row per user | `text/csv` | CSV columns: `id, label, host, port, username, password, http_url, socks5_url, status, current_ip, rotation_url` (`status` is the `disabled_reason` when the proxy is disabled). **curl** ```bash curl 'https://proxykite.com/api/v1/export?format=hostport_at' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: text/plain' ``` **Python** ```python import os import requests r = requests.get( "https://proxykite.com/api/v1/export?format=hostport_at", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, timeout=30, ) print(r.status_code) print(r.text) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/export?format=hostport_at', { headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', }, signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.text()); ``` **PHP** ```php true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', ], ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); echo $status, PHP_EOL, $body; ``` **Response `200`** ```text ind1.proxykite.com:30007@u7abc:s3cret ind1.proxykite.com:30008@u8xyz:an0ther ``` See [Proxy formats](https://proxykite.com/docs/guide/proxy-formats.md) for how to use each format. --- url: https://proxykite.com/docs/api/interfaces.md --- > For AI agents: the complete documentation index is available at https://proxykite.com/docs/llms.txt, the full documentation bundle is available at https://proxykite.com/docs/llms-full.txt. # Interfaces Each dongle is a network interface on your box. These endpoints show it and change how it gets its address. **Not available to reseller sub-users** (`403 forbidden`). Changes need the owner or a team admin. ## Addressing modes | Mode | What happens | | --------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `auto` (default for new dongles, recommended) | The box gives the dongle its own fixed address in the dongle's network, e.g. `192.168.8.11` (unique per box: .11–.99, then .200–.254). Several HiLink dongles (all `192.168.8.1`) work side by side. | | `dhcp` | The agent on the box asks the dongle for an address itself (default for adopted interfaces that are not Huawei dongles). | | `static` | You set `ip`, `prefix` (8–30) and `gateway` (the dongle). The gateway must be inside the subnet; the IP must not be the gateway, the network or broadcast address, or another dongle's address on the same box. | | `system` | The box's operating system manages the address; ProxyKite only routes. Dongles that existed before 2026-10-09 are in this mode. | Changes reach the box with its next heartbeat (\~15 s). `addressing.applied` / `addressing.error` show what the box reported back. Changing the dongle's own LAN subnet (HiLink) is only in the panel (proxy page → Interface → Advanced). ## The interface object ```json {"proxy_id": 7, "iface": "enx0c5b8f279a64", "mac": "0c:5b:8f:27:9a:64", "hw_key": "path:1-1.1", "usb_serial": null, "usb_path": "1-1.1", "usb_vendor": "12d1", "usb_product": "14db", "driver": "cdc_ether", "up": true, "speed_mbps": null, "ipv4": "192.168.8.11/24", "src_ip": "192.168.8.11", "gateway": "192.168.8.1", "route_table": 31007, "os_managed_by": "NetworkManager", "mtu": 1500, "addressing": {"mode": "auto", "ip": "192.168.8.11", "prefix": 24, "gateway": "192.168.8.1", "mtu": null, "dns": null, "reported_mode": "auto", "applied": true, "error": null}, "dhcp_lease": null, "lan": {"gateway": "192.168.8.1", "prefix": 24, "source": "ssdp"}, "lan_mismatch": false, "apn": {"supported": false, "value": null, "reported": null}, "data_connection": "connected", "data_connection_reason": null, "warnings": {"shared_address": null, "possible_duplicate_of": null}, "status": "online", "last_seen_at": "2026-10-09T18:00:00+00:00"} ``` Top-level `ipv4`, `src_ip`, `gateway`, `mtu` are what the box **reports**; `addressing` is what you **asked for**. | Field | Meaning | | ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `lan` | the dongle's own network as the box sees it (`gateway`, `prefix`, `source`). Needs agent ≥ 1.6.0, else `null` | | `lan_mismatch` | `true` (and `addressing.error` = `"lan_mismatch"`) when the saved address is not inside `lan`, so the proxy cannot work. Switch to `auto` (`PATCH … {"mode":"auto"}` picks an address in `lan`) or set a static address inside it | | `apn.supported` | `true` = the box brings this device's data connection up itself (device capability `data_connect`); only then can you [set the APN](#set-the-apn) | | `apn.value` | the APN you set (`null` = carrier default) | | `apn.reported` | the APN the modem uses now | | `data_connection`, `data_connection_reason` | whether the device has mobile data; same values as on the [proxy object](https://proxykite.com/docs/api/proxies.md#the-proxy-object) | | `warnings.shared_address` | `{"ip", "with": [proxy ids]}` when another live dongle on the same box reports the same address (e.g. two HiLinks in `dhcp` mode both leasing `192.168.8.100`): switch both to `auto`. Otherwise `null` | | `warnings.possible_duplicate_of` | on an offline entry with no hardware ID: the id of a live proxy it probably duplicates (same MAC or USB port). Check it and [delete](https://proxykite.com/docs/api/proxies.md#delete-and-restore) the stale one; nothing is deleted automatically. Otherwise `null` | ## Get `GET /proxies/{id}/interface` **Ability:** `read` **curl** ```bash curl 'https://proxykite.com/api/v1/proxies/7/interface' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' ``` **Python** ```python import os import requests r = requests.get( "https://proxykite.com/api/v1/proxies/7/interface", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/proxies/7/interface', { headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', }, signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', ], ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `200`:** `{"data": }` ## Change addressing `PATCH /proxies/{id}/interface` **Ability:** `manage` · **Who:** owner or team admin. | Body field | Type | | | ---------- | ---------------------------------------- | -------------------------- | | `mode` | `auto` \| `dhcp` \| `static` \| `system` | **required** | | `ip` | IPv4 | `static` only | | `prefix` | 8–30 | `static` only | | `gateway` | IPv4 | `static` only | | `mtu` | 576–9000 or `null` | optional, `null` = default | | `dns` | up to 3 IPv4 addresses, or `null` | optional | **curl** ```bash curl -X PATCH 'https://proxykite.com/api/v1/proxies/7/interface' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d '{"mode":"static","ip":"192.168.8.20","prefix":24,"gateway":"192.168.8.1"}' ``` **Python** ```python import os import requests r = requests.patch( "https://proxykite.com/api/v1/proxies/7/interface", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, json={"mode": "static", "ip": "192.168.8.20", "prefix": 24, "gateway": "192.168.8.1"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/proxies/7/interface', { method: 'PATCH', headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', 'Content-Type': 'application/json', }, body: JSON.stringify({"mode":"static","ip":"192.168.8.20","prefix":24,"gateway":"192.168.8.1"}), signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_CUSTOMREQUEST => 'PATCH', CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', 'Content-Type: application/json', ], CURLOPT_POSTFIELDS => '{"mode":"static","ip":"192.168.8.20","prefix":24,"gateway":"192.168.8.1"}', ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `200`:** `{"data": }` · `422 validation_failed` for bad or clashing addresses. ## Reset the link `POST /proxies/{id}/interface/reset` **Ability:** `manage` · **Who:** owner or team admin. Queues a link down/up and re-applies the settings on the box. Not available in `system` mode (`422`, `fields.mode`). **curl** ```bash curl -X POST 'https://proxykite.com/api/v1/proxies/7/interface/reset' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' ``` **Python** ```python import os import requests r = requests.post( "https://proxykite.com/api/v1/proxies/7/interface/reset", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/proxies/7/interface/reset', { method: 'POST', headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', }, signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', ], ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `202`** ```json {"data": {"id": 41, "type": "reset_iface", "mac": "0c:5b:8f:27:9a:64", "hw_key": "path:1-1.1", "status": "pending", "error": null, "created_at": "2026-10-09T18:00:00+00:00"}} ``` The box picks the action up with its next heartbeat; its progress shows in [`GET /nodes/{id}/interfaces`](https://proxykite.com/docs/api/nodes.md) → `pending_actions` while it is pending. ## Set the APN `PATCH /proxies/{id}/interface/apn` **Ability:** `manage` · **Who:** owner or team admin. The APN the box uses to bring the modem's data connection up. Only for devices with the `data_connect` [capability](https://proxykite.com/docs/api/proxies.md#device-type-and-capabilities) (USB modems, agent ≥ 1.6.0; `apn.supported` is `true`); other devices answer `409 unsupported`. | Body field | Type | | | ---------- | ---------------- | ---------------------------------------------------------------------------------------------------------------------------- | | `apn` | string or `null` | **required** key: up to 63 letters, digits, `.`, `-`, `_`, starting with a letter or digit; `null` or `""` = carrier default | **curl** ```bash curl -X PATCH 'https://proxykite.com/api/v1/proxies/7/interface/apn' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d '{"apn":"internet"}' ``` **Python** ```python import os import requests r = requests.patch( "https://proxykite.com/api/v1/proxies/7/interface/apn", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, json={"apn": "internet"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/proxies/7/interface/apn', { method: 'PATCH', headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', 'Content-Type': 'application/json', }, body: JSON.stringify({"apn":"internet"}), signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_CUSTOMREQUEST => 'PATCH', CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', 'Content-Type: application/json', ], CURLOPT_POSTFIELDS => '{"apn":"internet"}', ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `200`:** `{"data": }` · `409 unsupported` without `data_connect` · `422 validation_failed` for a bad APN. --- url: https://proxykite.com/docs/api/network-mode.md --- > For AI agents: the complete documentation index is available at https://proxykite.com/docs/llms.txt, the full documentation bundle is available at https://proxykite.com/docs/llms-full.txt. # Network mode Choose which mobile networks a dongle may use: **4G only**, 3G only, 2G only, **Auto** (4G/3G/2G), or a combination the dongle's firmware offers (for example 4G + 3G). Locking a dongle to 4G stops it from falling back to slow 2G (EDGE); Auto is better where 4G coverage is weak. Only devices with the capability `netmode.set` can do this (Huawei E3372 HiLink and, with agent 1.10.0 or newer, ZTE MF833T; see [Supported dongles](https://proxykite.com/docs/guide/supported-dongles.md)). For other device types both endpoints answer `409 unsupported` (see [device type and capabilities](https://proxykite.com/docs/api/proxies.md#device-type-and-capabilities)). In the panel: proxy page → **Connection** → _Network mode_. ## Read the current mode `GET /proxies/{id}/network-mode` **Ability:** `read` · 30 requests/min. Reads the dongle live through the node's tunnel (a few seconds). **curl** ```bash curl 'https://proxykite.com/api/v1/proxies/7/network-mode' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' ``` **Python** ```python import os import requests r = requests.get( "https://proxykite.com/api/v1/proxies/7/network-mode", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/proxies/7/network-mode', { headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', }, signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', ], ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `200`** ```json {"data": {"proxy_id": 7, "mode": "00", "label": "Auto (4G/3G/2G)", "network_band": "3FFFFFFF", "lte_band": "800C5", "options": [{"value": "00", "label": "Auto (4G/3G/2G)"}, {"value": "03", "label": "4G only"}, {"value": "02", "label": "3G only"}, {"value": "01", "label": "2G only"}], "options_source": "dongle", "network_type": "EDGE", "connection_status": "901", "connected": true, "signal_bars": 3, "read_at": "2026-10-10T19:10:00+00:00"}} ``` | Field | | | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `mode` | the dongle's current mode: `00` Auto, `03` 4G only, `02` 3G only, `01` 2G only; combos `030201` 4G + 3G + 2G, `0302` 4G + 3G, `0301` 4G + 2G, `0201` 3G + 2G | | `options` | the modes this dongle accepts, in menu order; offer only these | | `options_source` | `dongle` = the firmware's own list; `default` = the firmware has no list, the four basic modes are offered | | `network_type` | what the dongle is on right now: `LTE`, `LTE+`, `HSPA+`, `WCDMA`, `EDGE`, `GPRS`, … | | `connection_status` | `901` connected, `900` connecting, `902` disconnected, `903` disconnecting | | `network_band`, `lte_band` | the dongle's band settings (kept unchanged when you switch the mode) | ## Change the mode `PUT /proxies/{id}/network-mode` **Ability:** `manage` · **Who:** account owner, team admin, or the reseller sub-user the proxy is assigned to · 6 changes a minute per dongle. Switches the mode, then reads it back from the dongle to confirm. The dongle reconnects for a few seconds (open connections through the proxy drop); read the mode again after \~20 s to see the new `network_type`. IP rotation switches the mode for a moment and always returns to the mode set here. | Body field | | | ---------- | ---------------------------------------------------- | | `mode` | one of the `options` values, e.g. `"03"` for 4G only | **curl** ```bash curl -X PUT 'https://proxykite.com/api/v1/proxies/7/network-mode' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d '{"mode":"03"}' ``` **Python** ```python import os import requests r = requests.put( "https://proxykite.com/api/v1/proxies/7/network-mode", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, json={"mode": "03"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/proxies/7/network-mode', { method: 'PUT', headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', 'Content-Type': 'application/json', }, body: JSON.stringify({"mode":"03"}), signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_CUSTOMREQUEST => 'PUT', CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', 'Content-Type: application/json', ], CURLOPT_POSTFIELDS => '{"mode":"03"}', ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `200`**: the same object as above plus `changed` (`false` = it was already on that mode; nothing was sent) and `previous`: ```json {"ok": true, "data": {"proxy_id": 7, "mode": "03", "label": "4G only", "changed": true, "previous": "00", "network_type": "LTE", "connection_status": "900", "…": "…"}} ``` | Error | When | | -------------------------------- | --------------------------------------------------------------------- | | `422 validation_failed` | `mode` missing or not in `options` | | `409 unsupported` | the device cannot change its network mode | | `409 dongle_busy` | a rotation or status read is using the dongle, retry in a few seconds | | `429 rate_limited` | more than 6 changes a minute on this dongle (`Retry-After` header) | | `502 netmode_failed` | the dongle refused, or reported another mode after the change | | `502` / `503 dongle_unreachable` | node offline, tunnel down or dongle unplugged | --- url: https://proxykite.com/docs/api/nodes.md --- > For AI agents: the complete documentation index is available at https://proxykite.com/docs/llms.txt, the full documentation bundle is available at https://proxykite.com/docs/llms-full.txt. # Nodes A **node** is your Linux box running the ProxyKite agent, with the dongles plugged into it. Its id is in the panel URL (`/nodes/12`) and in each proxy's `node.id`. **Not available to reseller sub-users** (`GET /nodes` answers an empty list, the other endpoints `404 not_found`). ## The node object ```json {"id": 12, "name": "Rack A", "display_name": "Rack A", "hostname": "proxyserver2", "online": true, "tunnel_connected": true, "last_seen_at": "2026-10-10T08:00:00+00:00", "agent_version": "1.2.0", "os": "Debian GNU/Linux 12", "arch": "arm64", "uptime_s": 86400, "public_ip": "106.192.92.83", "location": {"country_code": "IN", "country": "India", "city": "Kolkata", "source": "auto"}, "isp": {"name": "Airtel", "asn": 9498, "as_name": "BHARTI-AIRTEL", "org": "Bharti Airtel Ltd", "country_code": "IN", "logo_url": "https://proxykite.com/isp-logos/airtel.png"}, "dongles": 2, "uplink": {"mode": "auto", "state": "system", "text": "Ethernet / default route"}} ``` | Field | Meaning | | -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | | `name` | your name for the box (`null` = none) | | `display_name` | `name`, or the hostname when no name is set | | `hostname` | the box's own hostname | | `online`, `tunnel_connected`, `last_seen_at` | whether the box is up and its tunnel to the cloud router is connected; last heartbeat | | `agent_version`, `os`, `arch`, `uptime_s` | what the box reports about itself | | `public_ip` | the box's public IP | | `location` | `country_code`, `country`, `city` and `source`: `auto` = from the box's public IP, `manual` = set by you | | `isp` | `{"name", "asn", "as_name", "org", "country_code", "logo_url"}` of the box's connection | | `dongles` | number of dongles on the box | | `uplink` | tunnel uplink: your `mode` and the current `state` / `text` (see [Tunnel uplink](https://proxykite.com/docs/api/tunnel-uplink.md)) | ## List nodes `GET /nodes` **Ability:** `read` · Your boxes. Reseller sub-users get an empty list. **curl** ```bash curl 'https://proxykite.com/api/v1/nodes' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' ``` **Python** ```python import os import requests r = requests.get( "https://proxykite.com/api/v1/nodes", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/nodes', { headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', }, signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', ], ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `200`:** `{"data": [, ...]}` ## Get one node `GET /nodes/{id}` **Ability:** `read` **curl** ```bash curl 'https://proxykite.com/api/v1/nodes/12' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' ``` **Python** ```python import os import requests r = requests.get( "https://proxykite.com/api/v1/nodes/12", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/nodes/12', { headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', }, signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', ], ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `200`:** `{"data": }` ## Rename or set the location `PATCH /nodes/{id}` **Ability:** `manage` · **Who:** owner or team admin. | Body field | Type | | | ----------------- | ---------------------------- | ----------------------------------------------------------------- | | `name` | string ≤ 64 chars, or `null` | optional; `null` or `""` = use the hostname | | `country_code` | ISO-2, e.g. `IN` | optional; switches the location to `manual` | | `city` | string or `null` | optional; switches the location to `manual` | | `location_source` | `auto` \| `manual` | optional; `auto` goes back to the location of the box's public IP | **curl** ```bash curl -X PATCH 'https://proxykite.com/api/v1/nodes/12' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d '{"name":"Rack A","country_code":"IN","city":"Kolkata"}' ``` **Python** ```python import os import requests r = requests.patch( "https://proxykite.com/api/v1/nodes/12", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, json={"name": "Rack A", "country_code": "IN", "city": "Kolkata"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/nodes/12', { method: 'PATCH', headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', 'Content-Type': 'application/json', }, body: JSON.stringify({"name":"Rack A","country_code":"IN","city":"Kolkata"}), signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_CUSTOMREQUEST => 'PATCH', CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', 'Content-Type: application/json', ], CURLOPT_POSTFIELDS => '{"name":"Rack A","country_code":"IN","city":"Kolkata"}', ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` To go back to the automatic location: **curl** ```bash curl -X PATCH 'https://proxykite.com/api/v1/nodes/12' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d '{"location_source":"auto"}' ``` **Python** ```python import os import requests r = requests.patch( "https://proxykite.com/api/v1/nodes/12", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, json={"location_source": "auto"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/nodes/12', { method: 'PATCH', headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', 'Content-Type': 'application/json', }, body: JSON.stringify({"location_source":"auto"}), signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_CUSTOMREQUEST => 'PATCH', CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', 'Content-Type: application/json', ], CURLOPT_POSTFIELDS => '{"location_source":"auto"}', ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `200`:** `{"data": }` ## Interfaces of a node `GET /nodes/{id}/interfaces` **Ability:** `read` Everything the box reported about its network interfaces: the dongles (as [interface objects](https://proxykite.com/docs/api/interfaces.md#the-interface-object)), its other interfaces, and box commands that are still pending. **curl** ```bash curl 'https://proxykite.com/api/v1/nodes/12/interfaces' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' ``` **Python** ```python import os import requests r = requests.get( "https://proxykite.com/api/v1/nodes/12/interfaces", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/nodes/12/interfaces', { headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', }, signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', ], ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `200`** ```json {"data": { "node_id": 12, "auto_adopt": true, "ignored_macs": [], "adopted_macs": [], "reported_at": "2026-10-09T18:00:00+00:00", "dongles": [{"proxy_id": 7, "iface": "enx0c5b8f279a64", "...": "..."}], "other_interfaces": [{"iface": "eth0", "mac": "dc:a6:32:00:00:01", "...": "..."}], "pending_actions": [{"id": 42, "type": "rescan", "mac": null, "hw_key": null, "status": "pending", "error": null, "created_at": "2026-10-09T18:00:00+00:00"}] }} ``` | Field | Meaning | | ------------------ | ------------------------------------------------------------------------------------------ | | `auto_adopt` | `true`: new dongles become proxies automatically; `false`: they wait as `pending_approval` | | `ignored_macs` | interfaces you told the panel to ignore | | `adopted_macs` | non-Huawei interfaces you adopted as proxies | | `other_interfaces` | the box's interfaces that are not proxies (as reported by the agent) | | `pending_actions` | queued box commands (`rescan`, `reset_iface`, …) not yet picked up | ## Reboot the box `POST /nodes/{id}/reboot` **Ability:** `manage` · **Who:** owner or team admin. Restarts the whole machine. Every proxy on it is offline for 1–3 minutes. Answers `202` with the queued action (`"type": "reboot"`); the box picks it up on its next heartbeat (\~15 s) and reboots about 10 s later. `422` with `errors.reboot` when the box is offline or its agent is older than 1.9.1. A reboot the box has not picked up within 5 minutes is dropped, so a box that comes back later never reboots by surprise. Limit: 5 calls per 10 minutes. ```bash curl -X POST 'https://proxykite.com/api/v1/nodes/12/reboot' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' ``` ## Rescan `POST /nodes/{id}/rescan` **Ability:** `manage` · **Who:** owner or team admin. Asks the box to look for new or removed dongles now, instead of waiting for its next scan. **curl** ```bash curl -X POST 'https://proxykite.com/api/v1/nodes/12/rescan' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' ``` **Python** ```python import os import requests r = requests.post( "https://proxykite.com/api/v1/nodes/12/rescan", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/nodes/12/rescan', { method: 'POST', headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', }, signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', ], ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `202`** ```json {"data": {"id": 42, "type": "rescan", "mac": null, "hw_key": null, "status": "pending", "error": null, "created_at": "2026-10-09T18:00:00+00:00"}} ``` --- url: https://proxykite.com/docs/api/ports.md --- > For AI agents: the complete documentation index is available at https://proxykite.com/docs/llms.txt, the full documentation bundle is available at https://proxykite.com/docs/llms-full.txt. # Ports Each proxy has a public **host:port** on our cloud router. Two layouts: | Mode | What it means | | ------------------ | ---------------------------------------------------------------------------------------------------------- | | `shared` (default) | One port speaks HTTP, HTTPS (`CONNECT`) **and** SOCKS5. `http_port` and `socks5_port` are the same number. | | `split` | Two ports: `http_port` speaks HTTP/HTTPS only, `socks5_port` speaks SOCKS5 only. | The ready-made strings in [`GET /proxies/{id}`](https://proxykite.com/docs/api/proxies.md) (`users[].http`, `users[].socks5`) always use the right port. You can pick the port numbers yourself from the cloud router's free range (`range`, 30000–30999 today). A port another proxy uses (yours or another customer's) cannot be taken. :::warning Changing a port or the mode **changes the proxy's address**. Every client still using the old address stops working within about 10 seconds. Each change is written to the activity log. ::: In `split` mode each port refuses the other protocol once the box runs agent **1.3.0** or newer (a SOCKS5 client on the HTTP port is refused; an HTTP client on the SOCKS5 port gets `400`). With an older agent both ports accept both. ## Get the ports `GET /proxies/{id}/ports` **Ability:** `read` **curl** ```bash curl 'https://proxykite.com/api/v1/proxies/7/ports' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' ``` **Python** ```python import os import requests r = requests.get( "https://proxykite.com/api/v1/proxies/7/ports", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/proxies/7/ports', { headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', }, signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', ], ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `200`** ```json {"data": {"mode": "split", "http_port": 30007, "socks5_port": 30544, "host": "ind1.proxykite.com", "range": {"min": 30000, "max": 30999}}} ``` ## Change the ports `PUT /proxies/{id}/ports` **Ability:** `manage` · **Who:** the account owner or a team admin. At most 20 changes per minute. | Body field | Type | | | ------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------- | | `mode` | string | **required**: `shared` or `split` | | `http_port` | integer | optional, new HTTP port (in `shared` mode: the one port). Leave it out to keep the current one | | `socks5_port` | integer | optional, `split` only, new SOCKS5 port. Leave it out to keep the current one, or to get a random free port when switching to `split` | **curl** ```bash curl -X PUT 'https://proxykite.com/api/v1/proxies/7/ports' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d '{"mode":"split","socks5_port":30544}' ``` **Python** ```python import os import requests r = requests.put( "https://proxykite.com/api/v1/proxies/7/ports", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, json={"mode": "split", "socks5_port": 30544}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/proxies/7/ports', { method: 'PUT', headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', 'Content-Type': 'application/json', }, body: JSON.stringify({"mode":"split","socks5_port":30544}), signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_CUSTOMREQUEST => 'PUT', CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', 'Content-Type: application/json', ], CURLOPT_POSTFIELDS => '{"mode":"split","socks5_port":30544}', ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `200`**: the ports object as in [Get the ports](#get-the-ports). `422 validation_failed` with `fields.http_port` / `fields.socks5_port` when a port is outside `range`, already used, or both ports are the same; `fields.socks5_port` "No free port left on this cloud router" when the range is full. ## Pick a free port `GET /proxies/{id}/ports/free` **Ability:** `manage` · Returns one random free port of this proxy's cloud router (`null` when the range is full). It is not reserved; use it in `PUT /proxies/{id}/ports` right away. **curl** ```bash curl 'https://proxykite.com/api/v1/proxies/7/ports/free' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' ``` **Python** ```python import os import requests r = requests.get( "https://proxykite.com/api/v1/proxies/7/ports/free", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/proxies/7/ports/free', { headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', }, signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', ], ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `200`** ```json {"data": {"port": 30544}} ``` --- url: https://proxykite.com/docs/api/proxies.md --- > For AI agents: the complete documentation index is available at https://proxykite.com/docs/llms.txt, the full documentation bundle is available at https://proxykite.com/docs/llms-full.txt. # Proxies A **proxy** is one 4G dongle on one of your nodes, published on one public port of our cloud router. Its id is the number in the panel URL (`/proxies/7`). ## The proxy object ```json { "id": 7, "label": "Shop A", "host": "ind1.proxykite.com", "port": 30007, "pending_host": null, "pending_port": null, "switch_at": null, "status": "online", "enabled": true, "disabled_reason": null, "data_connection": "connected", "data_connection_reason": null, "state": "online", "state_reason": null, "internet": {"ok": true, "error": null, "checked_at": "2026-11-15T06:12:40+00:00", "since": null}, "current_ip": "100.64.1.2", "signal": {"network_type": "LTE", "rsrp": "-95dBm"}, "fingerprint": "android", "auto_rotate_seconds": null, "sticky": false, "last_rotated_at": "2026-10-09T18:00:00+00:00", "rotation_url": "https://proxykite.com/r/", "expires_at": null, "quota_bytes": null, "used_bytes": 123456, "node": {"id": 12, "hostname": "proxyserver2", "online": true, "name": "Rack A", "display_name": "Rack A", "country_code": "IN", "city": "Kolkata"}, "users": [ {"username": "u7abc", "password": "s3cret", "max_conn": 200, "enabled": true, "http": "http://u7abc:s3cret@ind1.proxykite.com:30007", "socks5": "socks5://u7abc:s3cret@ind1.proxykite.com:30007"} ], "whitelist": [{"id": 3, "cidr": "203.0.113.4/32", "note": "office"}], "ports": {"mode": "shared", "http_port": 30007, "socks5_port": 30007, "host": "ind1.proxykite.com", "range": {"min": 30000, "max": 30999}}, "site_rules": {"mode": "off", "count": 0}, "limits": {"...": "..."}, "traffic": {"...": "..."}, "device": {"...": "..."} } ``` | Field | Meaning | | ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `id` | proxy id | | `label` | your name for it (`null` = none). Change with `PATCH /proxies/{id}` | | `host`, `port` | the public endpoint; see [Proxy formats](https://proxykite.com/docs/guide/proxy-formats.md). `host` is the cloud router your node is on: a hostname such as `ind1.proxykite.com`. If that router fails, the name moves to its standby server automatically, so always use the hostname (not its IP) and read it from the API rather than hard-coding it | | `pending_host`, `pending_port`, `switch_at` | set only while your node is scheduled to move to another cloud router: the new host (and port, normally unchanged) and when the switch happens. `null` otherwise. You also get an email and the `proxy.address_changing` webhook | | `status` | `online`, `offline`, `pending_approval` or `over_limit` | | `enabled` | `false` when the proxy refuses connections; `disabled_reason` says why | | `disabled_reason` | `null`, or one of the reasons below | | `data_connection` | whether the device has **mobile data**: `connected`, `disconnected` or `unknown` (device not online, or no reading in the last 10 minutes). `status` only says whether the box sees the device; a proxy can be `online` with `disconnected` data (e.g. HiLink connection status 902 on a 2G-only SIM, or a modem whose data bearer is down). The panel shows `disconnected` as a "No data" badge | | `data_connection_reason` | why it is `disconnected`, e.g. `"disconnected (902) · EDGE"`; otherwise `null` | | `state` | the one answer to "is this proxy working right now": `online`, or the worst current problem: `no_data` (no mobile data), `no_internet` (the dongle is up but nothing reaches the internet through it: SIM out of data or balance, carrier session dropped), `stalled` (USB link up, dongle silent), `offline` (unplugged / link down), `over_limit`, `pending`, `node_offline` (the box stopped sending heartbeats), `blocked` (disabled, expired, bandwidth limit, licence). Same order as the badge in the panel; the [uptime history](https://proxykite.com/docs/api/usage.md#uptime) is built from it | | `state_reason` | plain-English cause for any state other than `online`, e.g. `"No internet through the dongle: timeout"`; otherwise `null` | | `internet` | the agent's internet check **through the dongle** (agent 1.13.0 or newer, every minute, faster while failing): `ok` `true`/`false`/`null` (not checked: older agent, dongle down), `error` the short cause when `false` (`timeout`, `dns failure`, `network is unreachable`, …), `checked_at` time of the last check, `since` start of the current no-internet run or `null` | | `current_ip` | the mobile IP the proxy exits from | | `country_code` | country of `current_ip` (ISO-2) | | `isp` | `{"name", "asn", "as_name", "org", "country_code", "logo_url"}` of the exit IP, or `null`. `country_code` and `isp` come from a cached lookup refreshed every minute or so; right after a rotation they still show the previous IP's values | | `signal` | radio details when the dongle reports them (`network_type`, `operator`, `rsrp`, `rsrq`, `sinr`, `rssi`, …); may be `{}` | | `fingerprint` | OS fingerprint profile (`android`, `iphone`, `none`) | | `auto_rotate_seconds` | auto-rotation interval, `null` = off. See [Rotation](https://proxykite.com/docs/api/rotation.md) | | `sticky` | `true` pauses auto-rotation, keeping the current IP | | `last_rotated_at` | last successful rotation | | `rotation_url` | secret [rotation link](https://proxykite.com/docs/guide/rotation-links.md) | | `expires_at` | for reseller sub-user assignments: when access ends (`null` = never) | | `quota_bytes`, `used_bytes` | traffic quota (`null` = unlimited) and traffic used | | `node` | the box the dongle is plugged into: `id`, `hostname`, `online`, `name`, `display_name`, `country_code`, `city`; see [Nodes](https://proxykite.com/docs/api/nodes.md#the-node-object) | | `users` | proxy logins, with ready-to-use `http` and `socks5` URLs | | `whitelist` | client IPs/ranges allowed without a password; see [Whitelist](https://proxykite.com/docs/api/whitelist.md) | | `ports` | port mode and the HTTP / SOCKS5 port numbers; see [Ports](https://proxykite.com/docs/api/ports.md) | | `site_rules` | `{"mode", "count"}` of the proxy's [website rules](https://proxykite.com/docs/api/website-rules.md) | | `traffic` | traffic-insights settings and status; see [Traffic insights](https://proxykite.com/docs/api/traffic.md) | | `sim` | `GET /proxies/{id}` only, not for reseller sub-users; see [SIM card and recharge date](#sim-card-and-recharge-date) | | `limits` | SMS and bandwidth limits with current usage; see [SMS and bandwidth limits](#sms-and-bandwidth-limits) | | `device` | what the device is and what it can do: type, model, capabilities, permanent `uid`; see [Device type and capabilities](#device-type-and-capabilities) | **`disabled_reason` values:** `pending_approval` (the node has auto-adopt off; approve the dongle under Nodes), `admin_disabled`, `over_limit` (more dongles than the licence allows), `license_suspended`, `subscription_expired` (the licence was not renewed: paid-until date + grace days have passed; it comes back by itself after renewal), `owner_suspended`, `unpaid`, `assignee_suspended`, `expired`, `over_quota`, `bandwidth_limit` (a day/week/month bandwidth limit is used up; the proxy starts again when that period resets), `no_address` (the dongle has no IP on the box yet). ## List proxies `GET /proxies` **Ability:** `read` · Every proxy your login can see, ordered by id (up to 2000). Reseller sub-users see only the proxies assigned to them. **curl** ```bash curl 'https://proxykite.com/api/v1/proxies' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' ``` **Python** ```python import os import requests r = requests.get( "https://proxykite.com/api/v1/proxies", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/proxies', { headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', }, signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', ], ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `200`:** `{"data": [, ...]}` ## Get one proxy `GET /proxies/{id}` **Ability:** `read` **curl** ```bash curl 'https://proxykite.com/api/v1/proxies/7' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' ``` **Python** ```python import os import requests r = requests.get( "https://proxykite.com/api/v1/proxies/7", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/proxies/7', { headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', }, signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', ], ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `200`:** `{"data": }` · `404 not_found` if the proxy does not exist or is not yours. ## Rename a proxy `PATCH /proxies/{id}` **Ability:** `manage` · **Who:** account owner or team admin (sub-users and viewers get `403 forbidden`). | Body field | Type | | | ---------- | ------------------------------------ | --------------------------------------------- | | `label` | string ≤ 100 chars, or `null` / `""` | **required**; `null` or `""` clears the label | **curl** ```bash curl -X PATCH 'https://proxykite.com/api/v1/proxies/7' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d '{"label":"Shop A"}' ``` **Python** ```python import os import requests r = requests.patch( "https://proxykite.com/api/v1/proxies/7", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, json={"label": "Shop A"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/proxies/7', { method: 'PATCH', headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', 'Content-Type': 'application/json', }, body: JSON.stringify({"label":"Shop A"}), signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_CUSTOMREQUEST => 'PATCH', CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', 'Content-Type: application/json', ], CURLOPT_POSTFIELDS => '{"label":"Shop A"}', ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `200`:** `{"data": }` (the updated proxy). ## SIM card and recharge date `PATCH /proxies/{id}` **Ability:** `manage` · **Who:** account owner or team admin. The SIM details of a dongle: phone number, operator, plan note and the next recharge date. We remind you (see [Alerts](https://proxykite.com/docs/api/alerts.md)) about 09:00 in your timezone `remind_days_before` days before, on the day, and daily for a week while overdue. `GET /proxies/{id}` returns the same `sim` object (not for reseller sub-users). These details belong to the **SIM card**: when the device reports its SIM (ICCID), a SIM moved to another dongle takes its number, recharge date and SMS limits along. Read-only extras: `id`, `identified` (the SIM's ICCID is known), `iccid_last4`, `sms_limits` `{day, week, month}`. Send only the keys you change; `null` or `""` clears one. `sim` may be sent alone or together with `label` / other fields. | `sim` field | | | -------------------- | --------------------------------------------------------------------- | | `phone` | international format, `+` and 7–15 digits (spaces/dashes are removed) | | `operator` | ≤ 60 chars. Read-only `operator_detected` = the exit IP's ISP, a hint | | `plan` | ≤ 200 chars, free text | | `next_recharge_date` | `YYYY-MM-DD` | | `remind_days_before` | 0–60, default 3 | **curl** ```bash curl -X PATCH 'https://proxykite.com/api/v1/proxies/7' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d '{"sim":{"phone":"+919800000000","operator":"Jio","next_recharge_date":"2026-11-01","remind_days_before":3}}' ``` **Python** ```python import os import requests r = requests.patch( "https://proxykite.com/api/v1/proxies/7", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, json={"sim": {"phone": "+919800000000", "operator": "Jio", "next_recharge_date": "2026-11-01", "remind_days_before": 3}}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/proxies/7', { method: 'PATCH', headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', 'Content-Type': 'application/json', }, body: JSON.stringify({"sim":{"phone":"+919800000000","operator":"Jio","next_recharge_date":"2026-11-01","remind_days_before":3}}), signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_CUSTOMREQUEST => 'PATCH', CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', 'Content-Type: application/json', ], CURLOPT_POSTFIELDS => '{"sim":{"phone":"+919800000000","operator":"Jio","next_recharge_date":"2026-11-01","remind_days_before":3}}', ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `200`:** `{"data": }`: ```json "sim": {"phone": "+919800000000", "operator": "Jio", "operator_detected": "Reliance Jio Infocomm", "plan": null, "next_recharge_date": "2026-11-01", "remind_days_before": 3, "days_left": 22} ``` `days_left` is counted in the owner's timezone; negative = overdue. Errors name the fields `sim_phone`, `sim_recharge_date`, … in `fields`. ## SMS and bandwidth limits `GET /proxies/{id}/limits` · `PATCH /proxies/{id}` **Ability:** `read` to see them (also the `limits` object in every proxy), `manage` to change them · **Who changes:** account owner or team admin (reseller sub-users and viewers see them read-only). Each proxy can have an SMS send limit and a bandwidth limit per **day**, **week** (Monday–Sunday) and **month**, each optional. Periods are calendar periods in the account's timezone (`timezone` in the answer). - **SMS:** every SMS the dongle accepts (panel or [`POST /proxies/{id}/sms`](https://proxykite.com/docs/api/sms.md#send-an-sms)) counts. When a limit is used up, sending is refused with `429 sms_limit_reached` until that period resets. - **Bandwidth:** traffic in + out of all proxy logins, checked about once a minute. At 80 % you get a `bandwidth_warning` alert, at 100 % the proxy stops (`enabled:false`, `disabled_reason:"bandwidth_limit"`) and you get `bandwidth_limit_reached`; it starts again by itself when the period resets. Raising/removing the limit or `reset_bandwidth` starts it at once. `PATCH` body (send only what you change; `null` or `0` removes a limit): | `limits` field | | | ------------------------------------- | --------------------------------------------------------------------------------- | | `sms.day`, `sms.week`, `sms.month` | max SMS per period (0–1,000,000) | | `bandwidth_mb.day`, `.week`, `.month` | max traffic per period in MB (1 GB = 1024 MB) | | `reset_bandwidth` | `true` = count bandwidth from zero again in the current day/week/month (unblocks) | **curl** ```bash curl -X PATCH 'https://proxykite.com/api/v1/proxies/7' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d '{"limits":{"sms":{"day":50,"month":1000},"bandwidth_mb":{"day":5120,"month":null}}}' ``` **Python** ```python import os import requests r = requests.patch( "https://proxykite.com/api/v1/proxies/7", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, json={"limits": {"sms": {"day": 50, "month": 1000}, "bandwidth_mb": {"day": 5120, "month": None}}}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/proxies/7', { method: 'PATCH', headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', 'Content-Type': 'application/json', }, body: JSON.stringify({"limits":{"sms":{"day":50,"month":1000},"bandwidth_mb":{"day":5120,"month":null}}}), signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_CUSTOMREQUEST => 'PATCH', CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', 'Content-Type: application/json', ], CURLOPT_POSTFIELDS => '{"limits":{"sms":{"day":50,"month":1000},"bandwidth_mb":{"day":5120,"month":null}}}', ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `200`:** `{"data": }`. The `limits` object (also from `GET /proxies/{id}/limits` as `{"data": …}`): ```json {"timezone": "Asia/Kolkata", "sms": {"day": {"limit": 50, "used": 12, "resets_at": "2026-10-10T18:30:00+00:00"}, "week": {"limit": null, "used": 40, "resets_at": "2026-10-11T18:30:00+00:00"}, "month": {"limit": 1000, "used": 210, "resets_at": "2026-10-31T18:30:00+00:00"}}, "bandwidth": {"day": {"limit_bytes": 5368709120, "used_bytes": 4400000000, "percent": 82, "resets_at": "2026-10-10T18:30:00+00:00"}, "week": {"limit_bytes": null, "used_bytes": 9100000000, "percent": null, "resets_at": "2026-10-11T18:30:00+00:00"}, "month": {"limit_bytes": null, "used_bytes": 30500000000, "percent": null, "resets_at": "2026-10-31T18:30:00+00:00"}}, "blocked": false, "blocked_reason": null, "blocked_period": null, "blocked_until": null} ``` `blocked: true` (with `blocked_period` and `blocked_until`) while a bandwidth limit has stopped the proxy. Usage is counted in hourly steps: with a half-hour timezone (e.g. India) the hour that straddles midnight counts to the previous period. **curl** ```bash curl 'https://proxykite.com/api/v1/proxies/7/limits' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' ``` **Python** ```python import os import requests r = requests.get( "https://proxykite.com/api/v1/proxies/7/limits", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/proxies/7/limits', { headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', }, signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', ], ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` ## Device type and capabilities Every proxy object carries a `device` object. Your own logins (not reseller sub-users) also get `device.identity`. ```json "device": { "uid": "01k7c2y9s8m3v5q1x0h4f6t2wb", "type": "hilink", "type_label": "Huawei HiLink dongle", "reported": true, "model": "E3372h-320", "firmware": "22.333.01.00.00", "driver_version": "1.0.0", "state": "ok", "control_via": "panel", "identity_state": "confirmed", "capabilities": { "egress": {"s": "yes", "kind": "netdev"}, "rotate.netmode": {"s": "yes"}, "sms.send": {"s": "yes"}, "ussd": {"s": "setup", "hint": "Install ModemManager: sudo hostyourproxy setup modem"}, "web_ui": {"s": "no"} }, "rotate_methods": ["netmode", "reconnect", "reboot"], "identity": {"imei_last4": "0123", "moved_from_node_id": null, "moved_at": null, "conflict_with_proxy_id": null, "restorable_from_proxy_id": null} } ``` | Field | Meaning | | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `uid` | permanent id of the device; stays the same when the device moves to another USB port or another of your nodes | | `type` | `hilink` (Huawei HiLink dongle), `zte` (ZTE dongle such as the MF833T, agent 1.10.0+), `mm` (USB modem), `android` (phone), `generic` (plain network interface, no device control) | | `reported` | `false` = the node runs an older agent and the type is assumed | | `capabilities` | each capability → `s`: `yes` (works now), `setup` (possible; `hint` says what to do) or `no` | | `rotate_methods` | rotation methods that work now, in the order the panel tries them | | `identity_state` | `confirmed` (hardware ID known, settings follow the device), `weak` (no ID, settings follow the USB port), `identifying`, `conflict` (two proxies report one ID; choose in the panel) | | `identity` | owner/team only: last 4 digits of the IMEI, where it moved from, conflict and restore pointers | Capability names: `egress`, `rotate.netmode`, `rotate.reconnect`, `rotate.airplane`, `rotate.reboot`, `rotate.link_bounce`, `status.signal`, `sms.read`, `sms.send`, `sms.delete`, `ussd`, `device.reboot`, `web_ui`, `lan.settings`, `netmode.set`, `identity.imei`, `identity.iccid`, `identity.imsi`, `identity.device_key`, `data_connect` (the box brings the device's data connection up itself, with your [APN](https://proxykite.com/docs/api/interfaces.md#set-the-apn)). Show only what is `yes`. Asking for something the device cannot do answers **`409 unsupported`** with the `capability` that is missing (rotation, rotation links, sending SMS; the SMS list and interface endpoints only when the device has no such thing at all; the interface endpoints when `egress.kind` is `app`). ## Delete and restore Deleting a proxy frees its public port at once and stops it. Its logins, whitelist, label and rotation link are kept for **7 days**: restore them here or in the panel (Nodes → Interfaces → Recently deleted). When the same device is plugged in again within those days, it comes back as a new proxy and the panel offers to restore the old settings. Only the account owner or a team admin can delete or restore; reseller sub-users cannot (nor list deleted proxies). A live proxy whose [interface](https://proxykite.com/docs/api/interfaces.md#the-interface-object) shows `warnings.possible_duplicate_of` is a likely candidate for deleting; nothing is deleted automatically. | | | | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `DELETE /proxies/{id}` | **manage** → `{"ok": true, "data": {"id", "label", "node_id", "device_uid", "device_type", "port", "deleted_at", "restorable_until"}}` | | `GET /proxies/deleted` | **read** → `{"data": [ …same objects… ]}` (`port` = the port it had) | | `POST /proxies/{id}/restore` | **manage** → `{"ok": true, "data": }`; the old port comes back when it is still free. If the device is already back as a new proxy, that new proxy is replaced by the restored one. `404` after 7 days | ```bash curl -X DELETE 'https://proxykite.com/api/v1/proxies/7' -H "Authorization: Bearer $HYP_TOKEN" -H 'Accept: application/json' curl -X POST 'https://proxykite.com/api/v1/proxies/7/restore' -H "Authorization: Bearer $HYP_TOKEN" -H 'Accept: application/json' ``` ## Related - Rotate, auto-rotate and rotation history: [Rotation](https://proxykite.com/docs/api/rotation.md) - New passwords: [Credentials](https://proxykite.com/docs/api/credentials.md) - Whitelist: [Whitelist](https://proxykite.com/docs/api/whitelist.md) · Traffic: [Usage](https://proxykite.com/docs/api/usage.md) · Text messages: [SMS](https://proxykite.com/docs/api/sms.md) - All connection strings at once: [Export](https://proxykite.com/docs/api/export.md) --- url: https://proxykite.com/docs/api/rotation.md --- > For AI agents: the complete documentation index is available at https://proxykite.com/docs/llms.txt, the full documentation bundle is available at https://proxykite.com/docs/llms-full.txt. # Rotation Rotating gives a proxy a new mobile IP (the dongle reconnects to the carrier). You can rotate on demand, on a timer (auto-rotate), or through the token-less [rotation link](https://proxykite.com/docs/guide/rotation-links.md). ## Rotate now `POST /proxies/{id}/rotate` **Ability:** `rotate` · **Who:** anyone on the account except team viewers; sub-users for their assigned proxies. The call is **synchronous**: it returns when the rotation is done, normally in 5–30 s and at most about 60 s. Use a client timeout of at least 90 s. **curl** ```bash curl -X POST 'https://proxykite.com/api/v1/proxies/7/rotate' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' ``` **Python** ```python import os import requests r = requests.post( "https://proxykite.com/api/v1/proxies/7/rotate", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, timeout=90, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/proxies/7/rotate', { method: 'POST', headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', }, signal: AbortSignal.timeout(90000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_TIMEOUT => 90, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', ], ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `200`** (flat, no `data` wrapper) ```json {"ok": true, "old_ip": "100.64.1.2", "new_ip": "100.64.9.8", "method": "netflip", "duration_ms": 8000} ``` `method` is how the dongle was rotated: `netflip` (network mode switched Auto ↔ 4G only; the dongle stays in the new mode until the next rotation), `netmode` (older toggle-and-restore) or `dataswitch` (mobile data off/on). Errors also carry `"ok": false`: | Status | `error` | | | ------ | ---------------------- | ------------------------------------------------------------------- | | 403 | `dongle_disabled` | the proxy is disabled (`message` names the reason) | | 409 | `rotation_in_progress` | a rotation of this proxy is already running, retry in a few seconds | | 501 | `not_implemented` | the dongle cannot rotate this way | | 502 | `rotation_failed` | no new IP; includes `old_ip` | Every rotation, successful or not, also fires the [`rotation.completed` webhook](https://proxykite.com/docs/guide/webhooks.md). ## Auto-rotate `PUT /proxies/{id}/auto-rotate` **Ability:** `manage` · **Who:** anyone on the account except team viewers; sub-users for their assigned proxies. | Body field | Type | | | ------------------ | ---------------------------------- | -------------------------------------------------------------- | | `interval_seconds` | integer 60–604800, or `null` / `0` | **required**; `null` or `0` turns auto-rotate off | | `sticky` | boolean | optional; `true` pauses auto-rotation and keeps the current IP | The panel offers 60, 120, 300, 600, 900, 1800, 3600, 7200, 21600, 43200, 86400, 259200 and 604800 seconds, but any value in range is accepted. Auto-rotation is checked once a minute and skips a proxy for 5 minutes after a failed auto-rotation. **curl** ```bash curl -X PUT 'https://proxykite.com/api/v1/proxies/7/auto-rotate' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d '{"interval_seconds":600,"sticky":false}' ``` **Python** ```python import os import requests r = requests.put( "https://proxykite.com/api/v1/proxies/7/auto-rotate", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, json={"interval_seconds": 600, "sticky": False}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/proxies/7/auto-rotate', { method: 'PUT', headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', 'Content-Type': 'application/json', }, body: JSON.stringify({"interval_seconds":600,"sticky":false}), signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_CUSTOMREQUEST => 'PUT', CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', 'Content-Type: application/json', ], CURLOPT_POSTFIELDS => '{"interval_seconds":600,"sticky":false}', ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `200`** ```json {"data": {"auto_rotate_seconds": 600, "sticky": false}} ``` `422 validation_failed` with `fields.interval_seconds` if the value is out of range. ## Rotation history `GET /proxies/{id}/rotations` **Ability:** `read` · Newest first. | Query | | | ------- | ----------------- | | `limit` | 1–200, default 50 | **curl** ```bash curl 'https://proxykite.com/api/v1/proxies/7/rotations?limit=20' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' ``` **Python** ```python import os import requests r = requests.get( "https://proxykite.com/api/v1/proxies/7/rotations?limit=20", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/proxies/7/rotations?limit=20', { headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', }, signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', ], ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `200`** ```json {"data": [ {"id": 981, "status": "ok", "old_ip": "100.64.1.2", "new_ip": "100.64.9.8", "method": "netmode", "duration_ms": 9000, "triggered_by": "api", "error": null, "created_at": "2026-10-09T18:00:00+00:00"} ]} ``` `status`: `running`, `ok`, `failed`, `not_implemented`. `triggered_by`: `api`, `link`, `panel`, `auto`. --- url: https://proxykite.com/docs/api/sms.md --- > For AI agents: the complete documentation index is available at https://proxykite.com/docs/llms.txt, the full documentation bundle is available at https://proxykite.com/docs/llms-full.txt. # SMS Text messages received by the dongle's SIM card (for example verification codes), and sending SMS from it. ## Received messages `GET /proxies/{id}/sms` **Ability:** `read` · Messages saved by the panel (it copies the dongle's inbox every 2 minutes), paged. | Query | | | ---------- | ---------------------------------------------------------- | | `page` | page number, from 1 | | `per_page` | 1–200, default 50 (`limit` means the same and still works) | | `sort` | `newest` (default) or `oldest`, by received date | **curl** ```bash curl 'https://proxykite.com/api/v1/proxies/7/sms?limit=10' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' ``` **Python** ```python import os import requests r = requests.get( "https://proxykite.com/api/v1/proxies/7/sms?limit=10", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/proxies/7/sms?limit=10', { headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', }, signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', ], ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `200`** ```json {"data": [ {"id": 55, "phone": "+919800000000", "content": "Your code is 123456", "received_at": "2026-10-09T18:00:00+00:00", "read": false} ], "meta": {"page": 1, "per_page": 50, "total": 1, "last_page": 1, "sort": "newest"}} ``` ## Delete saved messages `DELETE /proxies/{id}/sms` **Ability:** `manage` · **Who:** account owner, team admin, or a sub-user the SMS inbox is shared with (not viewers). Removes messages from the panel only; the dongle is not touched. | Body field | | | ---------- | -------------------------------------------------- | | `ids` | list of message ids (up to 500), or | | `all` | `true` to delete every saved message of this proxy | ```bash curl -X DELETE 'https://proxykite.com/api/v1/proxies/7/sms' \ -H "Authorization: Bearer $HYP_TOKEN" -H 'Accept: application/json' -H 'Content-Type: application/json' \ -d '{"ids":[55,56]}' ``` **Response `200`**: `{"ok": true, "data": {"deleted": 2}}` ## Sync now / free the dongle's storage `POST /proxies/{id}/sms/sync` **Ability:** `manage` · 10 requests/min. Copies the dongle's inbox to the panel right now. A HiLink stick stores only 50–100 SMS; when it is full, new verification codes are lost. With `delete_from_dongle: true` (owner or team admin) every message is saved here first and then deleted from the dongle. Use it as a one-off cleanup, or switch on "delete after sync" in the proxy's settings to do it automatically. Do not delete from the dongle if another application also reads its SMS. | Body field | | | -------------------- | ----------------------------------------------------------------------------------------- | | `delete_from_dongle` | `false` (default) keeps the dongle's copy; `true` empties the dongle's inbox after saving | ```bash curl -X POST 'https://proxykite.com/api/v1/proxies/7/sms/sync' \ -H "Authorization: Bearer $HYP_TOKEN" -H 'Accept: application/json' -H 'Content-Type: application/json' \ -d '{"delete_from_dongle":true}' ``` **Response `200`**: `{"ok": true, "data": {"fetched": 37, "new": 4, "deleted_from_dongle": 37}}` Errors: `409 dongle_busy` (rotation or another SMS running, retry shortly), `409 unsupported` (device cannot read / delete SMS), `502 dongle_unreachable`. ## Send an SMS `POST /proxies/{id}/sms` **Ability:** `manage` · **Who:** account owner, team admin, or the reseller sub-user the proxy is assigned to · 20 requests/min. Sends one SMS from the dongle's SIM (operator charges apply). "OK" means the dongle accepted it, not that it was delivered. Counts toward the proxy's [SMS limits](https://proxykite.com/docs/api/proxies.md#sms-and-bandwidth-limits). | Body field | | | ---------- | ------------------------------------------------------------------------------------- | | `to` | phone number, digits with optional leading `+` (spaces, dashes, brackets are removed) | | `text` | 1–670 characters | **curl** ```bash curl -X POST 'https://proxykite.com/api/v1/proxies/7/sms' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d '{"to":"+919800000000","text":"Hello"}' ``` **Python** ```python import os import requests r = requests.post( "https://proxykite.com/api/v1/proxies/7/sms", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, json={"to": "+919800000000", "text": "Hello"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/proxies/7/sms', { method: 'POST', headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', 'Content-Type': 'application/json', }, body: JSON.stringify({"to":"+919800000000","text":"Hello"}), signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', 'Content-Type: application/json', ], CURLOPT_POSTFIELDS => '{"to":"+919800000000","text":"Hello"}', ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `200`** ```json {"ok": true, "data": {"id": 31, "to": "+919800000000", "chars": 5, "sent_at": "2026-10-10T09:00:00+00:00"}, "limits": {"day": {"limit": 50, "used": 13, "resets_at": "2026-10-10T18:30:00+00:00"}, "week": {…}, "month": {…}}} ``` **`429`: an SMS limit is used up** (`limit` = the period that frees up last; `Retry-After` header in seconds): ```json {"error": "sms_limit_reached", "limit": "day", "max": 50, "used": 50, "resets_at": "2026-10-10T18:30:00+00:00", "message": "SMS limit reached: 50 of 50 this day. …"} ``` Other errors: `409 dongle_busy` (a rotation or another SMS is running, retry shortly), `422 validation_failed` (bad number or text), `502 sms_failed` (the dongle refused or is unreachable). ## Send from any number `POST /sms` **Ability:** `manage` · 60 requests/min. One call for all your numbers: ProxyKite picks the proxy itself, so you do not have to track limits or choose an id. How a number is picked: - only proxies your login may send from, whose device can send SMS, and that are plugged in and answering; - a number that has reached its day, week or month [SMS limit](https://proxykite.com/docs/api/proxies.md#sms-and-bandwidth-limits) is left out until the limit resets; - among the rest, the number that sent the fewest SMS today goes first, so sends spread evenly; - if that dongle is busy or refuses the SMS, the next number is tried (up to 3 attempts). Set a per-day limit on each proxy (panel: proxy page → **SMS** tab → "SMS limit per day", or `PATCH /proxies/{id}` with `{"limits":{"sms":{"day":50}}}`) and the pool moves on to the next number by itself when one is full. | Body field | | | ---------- | ----------------------------------------------------------------------------------- | | `to` | phone number, digits with optional leading `+` | | `text` | 1–670 characters | | `proxies` | optional list of proxy ids to choose from. Left out = every proxy you may send from | **curl** ```bash curl -X POST 'https://proxykite.com/api/v1/sms' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d '{"to":"+919800000000","text":"Hello"}' ``` **Python** ```python import os import requests r = requests.post( "https://proxykite.com/api/v1/sms", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, json={"to": "+919800000000", "text": "Hello"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/sms', { method: 'POST', headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', 'Content-Type': 'application/json', }, body: JSON.stringify({"to":"+919800000000","text":"Hello"}), signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', 'Content-Type: application/json', ], CURLOPT_POSTFIELDS => '{"to":"+919800000000","text":"Hello"}', ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `200`**: `proxy_id` / `from` tell you which number sent it; `skipped` lists the numbers that were left out and why (`limit_reached`, `offline`, `unsupported`, `busy`, `send_failed`). ```json {"ok": true, "data": {"id": 32, "to": "+919800000000", "chars": 5, "sent_at": "2026-11-23T09:00:00+00:00", "proxy_id": 9, "label": "Jio 2", "from": "+919811111111"}, "limits": {"day": {"limit": 50, "used": 14, "resets_at": "2026-11-23T18:30:00+00:00"}, "week": {…}, "month": {…}}, "skipped": [{"proxy_id": 7, "reason": "limit_reached"}]} ``` **`429`: every number is at its limit** (`resets_at` = when the first one is free again; `Retry-After` header in seconds): ```json {"error": "sms_limit_reached", "message": "Every number in the pool has reached its SMS limit.", "skipped": [{"proxy_id": 7, "reason": "limit_reached"}, {"proxy_id": 9, "reason": "limit_reached"}], "resets_at": "2026-11-23T18:30:00+00:00"} ``` Other errors: `409 no_sms_proxy` (no proxy that can send right now: none shared with you, all offline, or none of the listed ids are yours), `409 dongle_busy` (retry shortly), `422 validation_failed`, `502 sms_failed` (the dongles tried did not accept the SMS). ## List the sending numbers `GET /sms/senders` **Ability:** `read` · Every proxy you may send SMS from, in the order `POST /sms` would use them, with today's usage. ```bash curl 'https://proxykite.com/api/v1/sms/senders' \ -H "Authorization: Bearer $HYP_TOKEN" -H 'Accept: application/json' ``` **Response `200`** ```json {"data": [ {"proxy_id": 9, "label": "Jio 2", "from": "+919811111111", "available": true, "skip_reason": null, "limits": {"day": {"limit": 50, "used": 14, "resets_at": "2026-11-23T18:30:00+00:00"}, "week": {…}, "month": {…}}}, {"proxy_id": 7, "label": "Airtel 1", "from": null, "available": false, "skip_reason": "limit_reached", "limits": {…}} ]} ``` --- url: https://proxykite.com/docs/api/traffic.md --- > For AI agents: the complete documentation index is available at https://proxykite.com/docs/llms.txt, the full documentation bundle is available at https://proxykite.com/docs/llms-full.txt. # Traffic insights See which websites a proxy connects to: **live**, as **top domains** per hour / day / week / month, and optionally in an **access log** kept on **your own box** for the number of days you choose (1–90). - **Off by default.** Only the account owner can switch it on (in the panel this asks for your password and shows the notice below). Team admins can change the settings and look at the data; team viewers and reseller sub-users only see that insights are on (`traffic.notice`). - **What is recorded:** domain name, port, time, data amounts, the login and the client IP that used the proxy. **Never** page paths, query strings, headers, contents or passwords. HTTPS is never decrypted: for HTTPS connections made to a bare IP the agent reads the site name the client sends in the TLS handshake (SNI, can be switched off with `traffic_sni`). - **Where it is stored:** the detailed log stays on your box (`/var/lib/hostyourproxy/traffic/`, compressed, one file per day, deleted after `traffic_retention_days`). The panel keeps only hourly per-domain totals (top 200 domains per hour). - Needs agent **1.5.0** or newer on the box (`traffic.supported`) and a cloud router that offers it. :::warning Notice shown when switching on ProxyKite will record which websites this proxy connects to (domain names, times, data amounts, the client IP that used it). You are responsible for telling the people who use this proxy and for complying with the law where you and they are. Logs are stored on your own machine for the days you choose. ::: Every proxy object carries the state: ```json "traffic": {"view": true, "log": true, "retention_days": 30, "sni": true, "supported": true, "enabled_at": "2026-10-10T12:00:00+00:00", "status": {"log_bytes": 1048576, "log_days": 3, "log_oldest": "2026-10-08", "log_pruned_early": false, "error": null}, "notice": "Traffic insights are on for this proxy"} ``` **Site admins** looking at another account's proxy must pass `reason` (5–500 characters) on every data call; it is written to the audit log. ## Switch on, change settings, switch off `PATCH /proxies/{id}` **Ability:** `manage`. Fields (any subset, may come alone): `traffic_view`, `traffic_log` (needs `traffic_view`), `traffic_retention_days` (1–90), `traffic_sni`. Switching off (`traffic_view: false`) also stops the log; files already on the box are deleted when they pass the retention days. **curl** ```bash curl -X PATCH 'https://proxykite.com/api/v1/proxies/7' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d '{"traffic_view":true,"traffic_log":true,"traffic_retention_days":30}' ``` **Python** ```python import os import requests r = requests.patch( "https://proxykite.com/api/v1/proxies/7", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, json={"traffic_view": True, "traffic_log": True, "traffic_retention_days": 30}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/proxies/7', { method: 'PATCH', headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', 'Content-Type': 'application/json', }, body: JSON.stringify({"traffic_view":true,"traffic_log":true,"traffic_retention_days":30}), signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_CUSTOMREQUEST => 'PATCH', CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', 'Content-Type: application/json', ], CURLOPT_POSTFIELDS => '{"traffic_view":true,"traffic_log":true,"traffic_retention_days":30}', ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` Errors: `409 agent_too_old` (the box's agent is older than 1.5.0), `409 insights_off` (`traffic_log` without `traffic_view`), `403` for team admins switching it on. ## State `GET /proxies/{id}/traffic` **Ability:** `read` (everyone who sees the proxy). Returns the `traffic` object above. **curl** ```bash curl 'https://proxykite.com/api/v1/proxies/7/traffic' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' ``` **Python** ```python import os import requests r = requests.get( "https://proxykite.com/api/v1/proxies/7/traffic", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/proxies/7/traffic', { headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', }, signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', ], ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` ## Top domains `GET /proxies/{id}/traffic/top?period=24h&limit=50` **Ability:** `read`. `period` = `1h`, `24h` (default), `7d`, `30d`; `limit` ≤ 200. From the hourly totals the box sends once an hour has finished; everything outside the top domains is in `other`. **curl** ```bash curl 'https://proxykite.com/api/v1/proxies/7/traffic/top?period=7d&limit=10' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' ``` **Python** ```python import os import requests r = requests.get( "https://proxykite.com/api/v1/proxies/7/traffic/top?period=7d&limit=10", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/proxies/7/traffic/top?period=7d&limit=10', { headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', }, signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', ], ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` ```json {"data": {"period": "7d", "from": "2026-10-03T13:00:00+00:00", "domains": [{"domain": "google.com", "conns": 1200, "bytes_in": 52428800, "bytes_out": 1024000, "denied": 0}], "other": {"domain": "(other)", "conns": 31, "bytes_in": 1200, "bytes_out": 300, "denied": 1}, "total": {"conns": 1231, "bytes_in": 52430000, "bytes_out": 1024300, "denied": 1}}} ``` ## Recent connections `GET /proxies/{id}/traffic/recent?limit=100&since_seq=0` **Ability:** `read`. Read live from the box (the last 512 connections it remembers). Pass the `seq` of the previous answer as `since_seq` to get only newer records, a simple way to poll. **curl** ```bash curl 'https://proxykite.com/api/v1/proxies/7/traffic/recent?limit=50' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' ``` **Python** ```python import os import requests r = requests.get( "https://proxykite.com/api/v1/proxies/7/traffic/recent?limit=50", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/proxies/7/traffic/recent?limit=50', { headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', }, signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', ], ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` ```json {"data": {"seq": 9813, "active": 3, "hour": "2026-10-10T12:00:00Z", "view": true, "log": true, "records": [{"seq": 9813, "cid": 5522, "ts": 1760097601000, "te": 1760097601900, "u": "u7a", "cip": "198.51.100.9", "p": "connect", "h": "www.google.com", "d": "google.com", "port": 443, "ip": "142.250.1.1", "sni": false, "in": 5120, "out": 800, "r": "ok"}], "top_now": [{"d": "google.com", "c": 120, "in": 5242880, "out": 102400, "denied": 0}]}} ``` Record fields: `ts`/`te` start/end (unix ms), `u` login (`""` = whitelisted IP), `cip` client IP, `p` `http` | `connect` | `socks`, `h` host, `d` registrable domain, `port`, `ip` the address dialled, `sni` (host read from TLS SNI), `in`/`out` bytes, `r` result: `ok`, `denied_private`, `denied_port`, `blocked_list` (website rules), `dial_error`, `dns_error`, `timeout`. ## Live stream `POST /proxies/{id}/traffic/live-token` **Ability:** `read`. Returns a one-minute, single-use URL on the cloud router that streams [Server-Sent Events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events): **curl** ```bash curl -X POST 'https://proxykite.com/api/v1/proxies/7/traffic/live-token' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' ``` **Python** ```python import os import requests r = requests.post( "https://proxykite.com/api/v1/proxies/7/traffic/live-token", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/proxies/7/traffic/live-token', { method: 'POST', headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', }, signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', ], ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` ```js const { data } = await (await fetch('/api/v1/proxies/7/traffic/live-token', { method: 'POST', headers })).json(); const es = new EventSource(data.url); es.addEventListener('conn', (e) => console.log(JSON.parse(e.data))); // a connection ended (record) es.addEventListener('open', (e) => console.log(JSON.parse(e.data))); // a connection started es.addEventListener('tick', (e) => console.log(JSON.parse(e.data))); // {"active": n} every 5 s es.addEventListener('end', () => es.close()); // ask for a new token to continue es.onerror = () => es.close(); // the token works once: never auto-reconnect ``` Events: `hello`, `open`, `conn`, `tick`, `end` (`{"reason": "max_age" | "insights_off" | "node_offline" | …}`). A session lasts at most 30 minutes; at most 4 viewers per proxy. ## Access log `GET /proxies/{id}/traffic/logs?from=&to=&q=&user=&client_ip=&cursor=&limit=200` **Ability:** `read`. Searches the log files on the box (the box must be online), newest first. `from`/`to`: unix seconds or an ISO date / date-time (UTC; default the last 24 h, at most 31 days). `q` = host contains, `limit` ≤ 1000. When `cursor` is not null, pass it to get the next page; `truncated: true` means the box stopped after 5 seconds. **curl** ```bash curl 'https://proxykite.com/api/v1/proxies/7/traffic/logs?from=2026-10-09&to=2026-10-10&q=google' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' ``` **Python** ```python import os import requests r = requests.get( "https://proxykite.com/api/v1/proxies/7/traffic/logs?from=2026-10-09&to=2026-10-10&q=google", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/proxies/7/traffic/logs?from=2026-10-09&to=2026-10-10&q=google', { headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', }, signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', ], ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` ## Export the access log (CSV) `GET /proxies/{id}/traffic/logs/export?from=&to=` **Ability:** `read`. Answers `302` to a one-minute download URL on the cloud router (follow redirects). At most 31 days. Columns: `start_utc,end_utc,user,client_ip,proto,host,domain,port,ip,sni,bytes_in,bytes_out,result`. Every export is in the audit log. **curl** ```bash curl 'https://proxykite.com/api/v1/proxies/7/traffic/logs/export?from=2026-10-01&to=2026-10-08' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: text/plain' ``` **Python** ```python import os import requests r = requests.get( "https://proxykite.com/api/v1/proxies/7/traffic/logs/export?from=2026-10-01&to=2026-10-08", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, timeout=30, ) print(r.status_code) print(r.text) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/proxies/7/traffic/logs/export?from=2026-10-01&to=2026-10-08', { headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', }, signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.text()); ``` **PHP** ```php true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', ], ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); echo $status, PHP_EOL, $body; ``` ## Errors | Status | `error` | Meaning | | ------ | --------------------- | ------------------------------------------------------------------------- | | 409 | `insights_off` | traffic insights are off for this proxy | | 409 | `log_off` | no access log on the box | | 503 | `node_offline` | the box has no tunnel to the cloud router | | 503 | `agent_too_old` | the box runs an agent older than 1.5.0 | | 503 | `agent_timeout` | the box did not answer in time | | 503 | `gateway_unavailable` | the cloud router does not offer traffic insights yet or cannot be reached | | 429 | `busy` | too many requests for this box at once | --- url: https://proxykite.com/docs/api/tunnel-uplink.md --- > For AI agents: the complete documentation index is available at https://proxykite.com/docs/llms.txt, the full documentation bundle is available at https://proxykite.com/docs/llms-full.txt. # Tunnel uplink Every proxy already leaves the internet through **its own dongle**. The _tunnel uplink_ is something else: the link your **box itself** uses to reach our server (the tunnel that carries all proxy connections, and the box's calls to the panel). By default that is the box's default route, normally Ethernet. If Ethernet, your router or your ISP goes down, the tunnel drops and every proxy of the node goes offline, even though each dongle still has data. With a backup uplink the box moves the tunnel to one of its dongles instead, and back to Ethernet when it works again. Needs **agent 1.7.0** or newer; older agents ignore the setting and keep using the default route (`"supported": false`). In the panel: **Nodes → node → Tunnel uplink**. **Not available to reseller sub-users** (`404`). | `mode` | What happens | | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `system` (default) | Default route (Ethernet) only (the behaviour before this feature). | | `auto` | Default route first. When the tunnel over it fails, the dongles in `dongle_ids`, in that order. Back to the default route once it has worked for `return_after_s` seconds. | | `dongle` | Only the dongles in `dongle_ids`, in order, for a box without Ethernet. | :::warning What it costs - While the box is on a backup dongle, **that SIM carries the traffic of all proxies of the node** (about the node's total traffic, both directions). Check its data plan. - Rotating the uplink dongle (auto-rotate, rotation link, API) changes its IP: the tunnel reconnects within a few seconds and open connections on **every** proxy of the node drop. `warnings.auto_rotate_dongle_ids` lists chosen dongles that have auto-rotate on; consider Sticky IP for them. - Switching uplink drops open proxy connections once; new ones work within seconds. ::: ## The uplink object ```json {"node_id": 12, "mode": "auto", "dongle_ids": [9, 7], "return_after_s": 60, "supported": true, "status": {"state": "dongle", "text": "Backup: Jio 1", "active": "dongle", "dongle_id": 9, "iface": "huawei81", "since": "2026-10-10T19:02:11Z", "switches": 3, "last_error": "default route: dial tcp ind1.proxykite.com:7443: i/o timeout", "reported_at": "2026-10-10T19:05:00+00:00"}, "dongles": [{"id": 7, "label": "Port 30000", "port": 30000, "auto_rotate": false, "uplink_bytes_in": 0, "uplink_bytes_out": 0}, {"id": 9, "label": "Jio 1", "port": 30001, "auto_rotate": true, "uplink_bytes_in": 1500000, "uplink_bytes_out": 420000}], "warnings": {"auto_rotate_dongle_ids": [9]}} ``` | Field | Meaning | | ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `mode`, `dongle_ids`, `return_after_s` | your setting (see below) | | `supported` | the box's agent understands the setting (1.7.0+) | | `status.state` | `system` = Ethernet / default route, `dongle` = a dongle carries the tunnel, `none` = nothing works right now, `unknown` = no report in the last 10 minutes (node offline), `too_old` = agent older than 1.7.0 | | `status.active`, `dongle_id`, `iface` | what the box reported in its last heartbeat (`null` when unknown) | | `status.since`, `switches`, `last_error` | when the current uplink became active (UTC), switches since the agent started, latest reason a link failed | | `dongles` | the node's dongles you can pick; `uplink_bytes_*` = tunnel + panel bytes sent over that dongle while it was the uplink (on top of its own proxy usage) | | `warnings.auto_rotate_dongle_ids` | chosen dongles with auto-rotate on | The [node object](https://proxykite.com/docs/api/nodes.md#the-node-object) also carries a short `"uplink": {"mode", "state", "text"}`. ## Get the uplink `GET /nodes/{id}/uplink` **Ability:** `read` **curl** ```bash curl 'https://proxykite.com/api/v1/nodes/12/uplink' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' ``` **Python** ```python import os import requests r = requests.get( "https://proxykite.com/api/v1/nodes/12/uplink", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/nodes/12/uplink', { headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', }, signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', ], ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `200`:** `{"data": }` ## Change the uplink `PUT /nodes/{id}/uplink` **Ability:** `manage` · **Who:** owner or team admin. The box picks the change up within one heartbeat (\~15 s). | Body field | Type | | | ---------------- | ------------------------------------------------- | --------------------------------------------------------------- | | `mode` | `system` \| `auto` \| `dongle` | required | | `dongle_ids` | array of 0–3 proxy ids of **this node**, in order | optional; missing = keep; `auto` and `dongle` need at least one | | `return_after_s` | integer 30–600 | optional; missing = keep (default 60); used by `auto` | **curl** ```bash curl -X PUT 'https://proxykite.com/api/v1/nodes/12/uplink' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d '{"mode":"auto","dongle_ids":[9,7],"return_after_s":60}' ``` **Python** ```python import os import requests r = requests.put( "https://proxykite.com/api/v1/nodes/12/uplink", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, json={"mode": "auto", "dongle_ids": [9, 7], "return_after_s": 60}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/nodes/12/uplink', { method: 'PUT', headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', 'Content-Type': 'application/json', }, body: JSON.stringify({"mode":"auto","dongle_ids":[9,7],"return_after_s":60}), signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_CUSTOMREQUEST => 'PUT', CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', 'Content-Type: application/json', ], CURLOPT_POSTFIELDS => '{"mode":"auto","dongle_ids":[9,7],"return_after_s":60}', ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `200`:** `{"data": }`. `422 validation_failed` for an unknown mode, more than 3 ids, an id that is not a dongle of this node, `return_after_s` out of range, or `auto`/`dongle` without a dongle. ## Alerts Under **Account → Alerts** (or `PATCH /alerts/settings`, see [Alerts](https://proxykite.com/docs/api/alerts.md)) the owner gets, once per change: `uplink_backup` (the tunnel moved to a dongle), `uplink_primary` (back on Ethernet) and `uplink_none` (no link worked for two heartbeats in a row). Times are in your timezone. --- url: https://proxykite.com/docs/api/usage.md --- > For AI agents: the complete documentation index is available at https://proxykite.com/docs/llms.txt, the full documentation bundle is available at https://proxykite.com/docs/llms-full.txt. # Usage ## Traffic `GET /proxies/{id}/usage` **Ability:** `read` · Traffic through the proxy in UTC time buckets. | Query | | | ------- | -------------------------------------------------------------------------------------------------- | | `range` | `24h` (hourly buckets, default), `7d` (hourly) or `30d` (daily). Anything else falls back to `24h` | **curl** ```bash curl 'https://proxykite.com/api/v1/proxies/7/usage?range=7d' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' ``` **Python** ```python import os import requests r = requests.get( "https://proxykite.com/api/v1/proxies/7/usage?range=7d", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/proxies/7/usage?range=7d', { headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', }, signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', ], ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `200`** ```json { "data": [ {"t": "2026-10-09T17:00:00+00:00", "bytes_in": 1048576, "bytes_out": 52428, "requests": 312} ], "range": "7d", "used_bytes": 123456789, "quota_bytes": null } ``` | Field | Meaning | | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | | `data[].t` | start of the bucket (UTC) | | `bytes_in`, `bytes_out` | bytes in and out through the proxy in that bucket, as counted on your node | | `requests` | proxied requests (HTTP requests, CONNECT tunnels, SOCKS5 connections) | | `used_bytes` | traffic counted against the quota | | `quota_bytes` | traffic quota, `null` = unlimited. Reaching it disables the proxy (`over_quota`) and fires [`quota.exceeded`](https://proxykite.com/docs/guide/webhooks.md) | ## Uptime `GET /proxies/{id}/uptime` **Ability:** `read` · Was the proxy working, and when it was not, why. Built from the panel's state history: every change of the proxy's `state` (see [the proxy object](https://proxykite.com/docs/api/proxies.md#the-proxy-object)) is recorded, so a downtime always carries its cause. History starts on 2026-11-15 (or when the proxy was first seen, if later); time before that is `unknown`. | Query | | | ------- | ------------------------------------------------------------------------------------------------------------- | | `range` | `24h` (5-minute buckets, default), `7d` (hourly) or `30d` (4-hour buckets). Anything else falls back to `24h` | ```bash curl 'https://proxykite.com/api/v1/proxies/7/uptime?range=24h' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' ``` **Response `200`** ```json { "data": { "range": "24h", "from": "2026-11-14T06:15:00+00:00", "to": "2026-11-15T06:15:00+00:00", "step_seconds": 300, "uptime_pct": 97.9, "tracked_since": "2026-11-15T04:00:00+00:00", "buckets": [ {"t": "2026-11-15T05:30:00+00:00", "up_ratio": 1.0, "state": "online", "reason": null}, {"t": "2026-11-15T05:35:00+00:00", "up_ratio": 0.4, "state": "no_internet", "reason": "No internet through the dongle: timeout"} ], "incidents": [ {"state": "no_internet", "reason": "No internet through the dongle: timeout", "started_at": "2026-11-15T05:38:10+00:00", "ended_at": "2026-11-15T06:02:41+00:00", "seconds": 1471} ] } } ``` | Field | Meaning | | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `uptime_pct` | share of the tracked time in this range the proxy was `online`; `null` when nothing is tracked yet | | `buckets[].up_ratio` | 0 to 1: how much of the bucket the proxy was `online` (`unknown` time is not counted) | | `buckets[].state` | `online`, `unknown`, or the down state that covered most of the bucket's downtime (`no_internet`, `stalled`, `offline`, `node_offline`, `no_data`, `blocked`, `over_limit`, `pending`) | | `buckets[].reason` | the latest cause recorded for that state in the bucket, `null` for `online`/`unknown` | | `incidents` | down periods overlapping the range, newest first, at most 50. `ended_at` `null` = still down; `seconds` is clipped to the range | --- url: https://proxykite.com/docs/api/website-rules.md --- > For AI agents: the complete documentation index is available at https://proxykite.com/docs/llms.txt, the full documentation bundle is available at https://proxykite.com/docs/llms-full.txt. # Website rules Limit which sites a proxy may reach: a **block list** (the listed sites are blocked, everything else works) or an **allow list** (only the listed sites work, everything else is blocked). The rules are enforced on your box by the agent, so the box must run agent **1.3.0 or newer** (`agent_supported` tells you); older agents keep the rules but do not apply them. | Entry | Matches | | ---------------------------- | -------------------------------------------------------------------------------- | | `example.com` | exactly `example.com` (not `www.example.com`) | | `*.example.com` | `example.com` **and** every name under it (`www.example.com`, `a.b.example.com`) | | `203.0.113.9`, `2001:db8::1` | that IP address | - Entries are cleaned up for you: lower-case, international names stored as punycode (`bücher.example` → `xn--bcher-kva.example`), a pasted URL keeps only its host, duplicates are dropped. At most **500** entries per proxy. - **Raw IP destinations:** allow list → blocked unless that IP is listed; block list → allowed unless listed. - A blocked HTTP request gets `403` with the body `Blocked by proxy policy` (header `X-Hyp-Blocked: policy`); a blocked HTTPS (`CONNECT`) request gets `403` before the tunnel opens; a blocked SOCKS5 connection is refused (reply code 2, "not allowed by ruleset"). - HTTPS is judged by the site name the client asks the proxy for. Nothing is decrypted, so an app that connects by IP (in block-list mode) or hides the real site behind a CDN cannot be told apart. - Rotation, SMS and the dongle's own controls are never affected. Changes reach the box within one heartbeat (\~15 s); open connections keep running until they close. ## Get the rules `GET /proxies/{id}/rules` **Ability:** `read` **curl** ```bash curl 'https://proxykite.com/api/v1/proxies/7/rules' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' ``` **Python** ```python import os import requests r = requests.get( "https://proxykite.com/api/v1/proxies/7/rules", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/proxies/7/rules', { headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', }, signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', ], ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `200`** ```json {"data": {"mode": "blocklist", "domains": ["facebook.com", "*.tiktok.com", "203.0.113.9"], "max_entries": 500, "agent_version": "1.3.0", "agent_supported": true}} ``` `mode` is `off`, `blocklist` or `allowlist`. With `off` the list is kept (so you can switch it back on) but nothing is blocked. ## Set the rules `PUT /proxies/{id}/rules` **Ability:** `manage` · **Who:** the account owner or a team admin (not team viewers, not reseller sub-users). | Body field | Type | | | ---------- | ---------------- | ---------------------------------------------------------------------------------------------------- | | `mode` | string | **required**: `off`, `blocklist` or `allowlist` | | `domains` | array of strings | optional, the whole new list (max 500). Leave it out to keep the current list and only change `mode` | **curl** ```bash curl -X PUT 'https://proxykite.com/api/v1/proxies/7/rules' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d '{"mode":"allowlist","domains":["example.com","*.example.org"]}' ``` **Python** ```python import os import requests r = requests.put( "https://proxykite.com/api/v1/proxies/7/rules", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, json={"mode": "allowlist", "domains": ["example.com", "*.example.org"]}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/proxies/7/rules', { method: 'PUT', headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', 'Content-Type': 'application/json', }, body: JSON.stringify({"mode":"allowlist","domains":["example.com","*.example.org"]}), signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_CUSTOMREQUEST => 'PUT', CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', 'Content-Type: application/json', ], CURLOPT_POSTFIELDS => '{"mode":"allowlist","domains":["example.com","*.example.org"]}', ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `200`**: the rules object as in [Get the rules](#get-the-rules). `422 validation_failed` (`fields.domains`) names the entries that are not a domain, `*.domain` or IP, a list over 500 entries, or an empty allow list (it would block every site). `fields.mode` for an unknown mode. --- url: https://proxykite.com/docs/api/whitelist.md --- > For AI agents: the complete documentation index is available at https://proxykite.com/docs/llms.txt, the full documentation bundle is available at https://proxykite.com/docs/llms-full.txt. # Whitelist Client IPs on a proxy's whitelist can use the proxy **without a username and password** (HTTP and SOCKS5). Everyone else still needs a proxy user. See [Proxy formats](https://proxykite.com/docs/guide/proxy-formats.md#whitelisted-ips-no-password). Rules: IPv4 ranges must be `/16` or narrower, IPv6 `/32` or narrower; at most 20 entries per proxy; a single IP is stored as `/32` (IPv4) or `/128` (IPv6). Changes reach the proxy with the node's next config pull (seconds). ## List `GET /proxies/{id}/whitelist` **Ability:** `read` **curl** ```bash curl 'https://proxykite.com/api/v1/proxies/7/whitelist' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' ``` **Python** ```python import os import requests r = requests.get( "https://proxykite.com/api/v1/proxies/7/whitelist", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/proxies/7/whitelist', { headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', }, signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', ], ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `200`** ```json {"data": [{"id": 3, "cidr": "203.0.113.4/32", "note": "office"}]} ``` ## Add `POST /proxies/{id}/whitelist` **Ability:** `manage` · **Who:** anyone on the account except team viewers; sub-users for their assigned proxies. | Body field | Type | | | ---------- | ------------ | --------------------------------------------------------------- | | `cidr` | string ≤ 64 | **required**: an IP (`203.0.113.4`) or range (`203.0.113.0/24`) | | `note` | string ≤ 100 | optional | **curl** ```bash curl -X POST 'https://proxykite.com/api/v1/proxies/7/whitelist' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -d '{"cidr":"203.0.113.4","note":"office"}' ``` **Python** ```python import os import requests r = requests.post( "https://proxykite.com/api/v1/proxies/7/whitelist", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, json={"cidr": "203.0.113.4", "note": "office"}, timeout=30, ) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/proxies/7/whitelist', { method: 'POST', headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', 'Content-Type': 'application/json', }, body: JSON.stringify({"cidr":"203.0.113.4","note":"office"}), signal: AbortSignal.timeout(30000), }); console.log(res.status, await res.json()); ``` **PHP** ```php true, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', 'Content-Type: application/json', ], CURLOPT_POSTFIELDS => '{"cidr":"203.0.113.4","note":"office"}', ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); var_dump($status, json_decode($body, true)); ``` **Response `201`** ```json {"data": {"id": 4, "cidr": "203.0.113.4/32", "note": "office"}} ``` `422 validation_failed` (`fields.cidr`) for an invalid or too-wide range, a duplicate, or a full list. ## Remove `DELETE /proxies/{id}/whitelist/{entryId}` **Ability:** `manage` **curl** ```bash curl -X DELETE 'https://proxykite.com/api/v1/proxies/7/whitelist/4' \ -H "Authorization: Bearer $HYP_TOKEN" \ -H 'Accept: application/json' ``` **Python** ```python import os import requests r = requests.delete( "https://proxykite.com/api/v1/proxies/7/whitelist/4", headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"}, timeout=30, ) print(r.status_code) # 204 = done ``` **Node.js** ```js const res = await fetch('https://proxykite.com/api/v1/proxies/7/whitelist/4', { method: 'DELETE', headers: { Authorization: `Bearer ${process.env.HYP_TOKEN}`, Accept: 'application/json', }, signal: AbortSignal.timeout(30000), }); console.log(res.status); // 204 = done ``` **PHP** ```php true, CURLOPT_CUSTOMREQUEST => 'DELETE', CURLOPT_TIMEOUT => 30, CURLOPT_HTTPHEADER => [ 'Authorization: Bearer ' . getenv('HYP_TOKEN'), 'Accept: application/json', ], ]); $body = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); echo $status, PHP_EOL; // 204 = done ``` **Response `204`** (no body) · `404 not_found` if the entry is not on this proxy. --- url: https://proxykite.com/docs/guide/authentication.md --- > For AI agents: the complete documentation index is available at https://proxykite.com/docs/llms.txt, the full documentation bundle is available at https://proxykite.com/docs/llms-full.txt. # Authentication & abilities Every API call needs a personal API token, sent as a bearer token: ```http GET /api/v1/proxies HTTP/1.1 Host: proxykite.com Authorization: Bearer 12|AbCdEf... Accept: application/json ``` A missing, wrong, revoked or expired token gets `401 unauthenticated`. Tokens are created and revoked in the panel under **API tokens**; each login can hold up to 50 tokens. ## Token abilities (access levels) Each token has exactly one access level. Levels are cumulative: `manage` can do everything `rotate` can, and `rotate` everything `read` can. | Level | Allows | | -------- | ----------------------------------------------------------------------------------------------- | | `read` | `GET` everything: account, proxies, usage, SMS, rotation history, whitelist, export, interfaces | | `rotate` | `read` + `POST /proxies/{id}/rotate` | | `manage` | `rotate` + rename, passwords, whitelist changes, auto-rotate, interface settings, node rescan | A call above the token's level answers `403 insufficient_ability`. [`GET /me`](https://proxykite.com/docs/api/account.md) shows the token's abilities. ## Your login still applies A token never gives more than the login it belongs to: | Login | What it can do through the API | | ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Owner** of the account | everything on the account's proxies and nodes | | **Team admin** | same as the owner (not billing or team membership, which the API does not cover) | | **Team viewer** | read only, can only create `read` tokens; any change answers `403 forbidden` | | **Reseller sub-user** | only the proxies assigned to it: rotate, auto-rotate, passwords, whitelist, send SMS. Not: rename, limits, SIM, website rules, ports, interfaces, delete/restore, nodes | Proxies or nodes your login cannot see answer `404 not_found`; the API never reveals other customers' ids. Visible but not allowed answers `403 forbidden`. A suspended login (or a sub-user / team member of a suspended account) gets `403 account_suspended` on every call. API tokens and webhooks need an active licence on the account (for sub-users and team members: on the parent account). Without one, tokens cannot be created, existing tokens answer `403 licence_required` on every call and webhooks are not sent. Nothing is deleted: tokens and webhooks work again as soon as a licence is active. ## Good practice - Give each script its own token with the lowest level it needs (a rotation bot only needs `rotate`). - Set an expiry for tokens you hand to third parties. - Changing your panel password does **not** revoke tokens. Revoke them yourself under **API tokens** if one may have leaked. --- url: https://proxykite.com/docs/guide/errors.md --- > For AI agents: the complete documentation index is available at https://proxykite.com/docs/llms.txt, the full documentation bundle is available at https://proxykite.com/docs/llms-full.txt. # Errors & rate limits ## Error format ```json {"error": "", "message": "Human readable text."} ``` - `422 validation_failed` adds `"fields": {"field": ["message", ...]}`. - Errors from [`POST /proxies/{id}/rotate`](https://proxykite.com/docs/api/rotation.md) and [rotation links](https://proxykite.com/docs/guide/rotation-links.md) also carry `"ok": false`. - Branch on `error` (stable), not on `message` (may change). ## Error codes | Status | `error` | When | | ------ | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 401 | `unauthenticated` | no token, wrong token, revoked or expired token | | 403 | `insufficient_ability` | the token's level is too low for this endpoint | | 403 | `forbidden` | your login may not do this (team viewer, or a sub-user on an owner-only action) | | 403 | `account_suspended` | the login or its account is suspended | | 403 | `licence_required` | the account has no active licence; the token works again once a licence is active | | 403 | `dongle_disabled` | rotating a disabled proxy (see `disabled_reason` on the [proxy](https://proxykite.com/docs/api/proxies.md)) | | 404 | `not_found` | unknown id, or a proxy/node your login cannot see | | 405 | `method_not_allowed` | wrong HTTP method for this path | | 409 | `rotation_in_progress` | another rotation of the same proxy is running | | 409 | `dongle_busy` | sending an SMS while the dongle is busy (rotation or another SMS) | | 409 | `no_sms_proxy` | [`POST /sms`](https://proxykite.com/docs/api/sms.md#send-from-any-number): no proxy that can send right now | | 409 | `unsupported` | the device cannot do this (e.g. a plain network interface cannot rotate); `capability` names what is missing (see [device capabilities](https://proxykite.com/docs/api/proxies.md#device-type-and-capabilities)) | | 422 | `validation_failed` | bad input; see `fields` | | 429 | `rate_limited` | over the rate limit; wait `Retry-After` seconds | | 429 | `sms_limit_reached` | the proxy's [SMS limit](https://proxykite.com/docs/api/proxies.md#sms-and-bandwidth-limits) is used up; also `limit`, `max`, `used`, `resets_at` | | 501 | `not_implemented` | this dongle model cannot rotate this way | | 502 | `rotation_failed` | the dongle did not get a new IP (the answer includes `old_ip`) | | 502 | `sms_failed` | the dongle refused the SMS or could not be reached | ## Rate limits | What | Limit | | -------------------------- | --------------------------------------------------------- | | REST API | 120 requests / minute per login (all its tokens together) | | Rotation link `/r/{token}` | 6 / minute per link, 30 / minute per client IP | Over the limit: `429` with a `Retry-After` header. Back off and retry after that many seconds. ## Retrying - `GET` requests are safe to retry. - `POST /proxies/{id}/rotate` on `409`: wait a few seconds and retry; on `502`: the dongle could not get a new address: retry once after \~30 s, then check the proxy in the panel. - `POST /proxies/{id}/password` is **not** idempotent: every call creates a new password. --- url: https://proxykite.com/docs/guide/proxmox.md --- > For AI agents: the complete documentation index is available at https://proxykite.com/docs/llms.txt, the full documentation bundle is available at https://proxykite.com/docs/llms-full.txt. # Run a ProxyKite box as a Proxmox VM You do not need a dedicated computer for your dongles. A small virtual machine on a Proxmox VE host works just as well: Proxmox hands the USB stick to the VM, and the VM runs the ProxyKite agent like any other box. This page is the exact procedure we use on our own Proxmox host (Proxmox VE 8.3, Huawei E3372 HiLink stick, Debian 13 guest). Every command below was run during that setup; the timings at the end are what we measured. ## What you need - A Proxmox VE host (7.x or 8.x) with a free USB 2.0/3.0 port. - One or more [supported 4G sticks](https://proxykite.com/docs/guide/supported-dongles.md) with a SIM that has data: Huawei E3372 (HiLink firmware) or ZTE MF833T (agent 1.10.0 or newer). The commands below show the Huawei stick; for the ZTE look for `19d2:1405` instead of `12d1:14dc` (`lsusb | grep -i zte`). - A ProxyKite licence key (`XXXX-XXXX-XXXX-XXXX`) from the panel under **Nodes**. - Root shell on the Proxmox host (`ssh root@` or the web shell). One VM can hold several sticks. Give each stick its own USB port on the host and pass each port through; the agent tells them apart by IMEI, so the order does not matter. :::warning Two or more Huawei E3372 sticks? Read this first With a cloud-init VM, a second E3372 stick can take your VM's own network card name at boot and the box drops off the panel. Do [the fix below](#two-or-more-huawei-e3372-sticks) **before** you plug in the second stick. ::: ## 1. Plug the stick in and find its USB port Plug the stick directly into the host (a powered hub is fine; an unpowered hub shared by several sticks is not). After \~10 s the host sees it. HiLink sticks first show up as a CD-ROM (`12d1:1f01`) and switch to a network card (`12d1:14dc`) by themselves; the host's `usb_modeswitch` package does that flip, so install it if missing: ```bash apt-get install -y usb-modeswitch usbutils lsusb | grep -i huawei # Bus 001 Device 004: ID 12d1:14dc Huawei Technologies Co., Ltd. E3372 LTE/UMTS/GSM HiLink Modem/Networkcard lsusb -t # /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M # |__ Port 7: Dev 4, If 0, Class=Communications, Driver=cdc_ether, 480M ``` Note the **bus and port**: here bus `1`, port `7`, so the port name is `1-7`. You can also read it from sysfs: ```bash for d in /sys/bus/usb/devices/[0-9]-*; do [ -f $d/idProduct ] && echo "$(basename $d) $(cat $d/idVendor):$(cat $d/idProduct)"; done # 1-7 12d1:14dc ``` Pass the stick through **by port**, not by its vendor/product ID. A port stays the same across reboots and across the CD-ROM → network-card flip; an ID-based entry (`host=12d1:14dc`) grabs _any_ HiLink stick that appears, which is exactly what you do not want with more than one VM or more than one stick. :::warning Another VM may already own the stick If an older VM on the same host has a `usb0: host=12d1:14dc` line in its config, it takes every HiLink stick that is plugged in. Check with `grep -l usb /etc/pve/qemu-server/*.conf` and remove the entry from that VM (`qm set -delete usb0`). Removing a USB device from a _running_ VM only takes effect on its next stop/start unless the VM uses the `q35` machine type. ::: ## 2. Create the VM Any Debian 12/13 or Ubuntu 22.04/24.04 VM works. The agent is a single static binary and needs very little: | Setting | Value we use | | ------- | -------------------------------------------------------------- | | CPU | 1 core (`host` type) | | RAM | 1024 MB (ballooning down to 512 MB is fine) | | Disk | 8 GB (the agent itself uses \~30 MB) | | Network | one virtio NIC on your LAN bridge (`vmbr0`), static IP or DHCP | | OS | Debian 13 generic cloud image, or a normal ISO install | Cloud image example (template `8003` is a Debian 13 _generic_ cloud image with cloud-init; substitute your own): ```bash qm clone 8003 108 --name proxykite-box --full 1 qm set 108 --memory 1024 --balloon 512 --cores 1 --agent enabled=1 qm resize 108 scsi0 8G qm set 108 --ipconfig0 ip=192.168.1.50/24,gw=192.168.1.1 --nameserver "1.1.1.1 8.8.8.8" qm set 108 --sshkeys ~/.ssh/id_rsa.pub # cloud-init: root login with your key ``` :::tip Use the standard kernel, not a "cloud" kernel The stick appears inside the VM as a USB network card (`cdc_ether`). Debian's _genericcloud_ images ship the `linux-image-cloud` kernel, which leaves out most USB drivers. Use the _generic_ image or a normal install, and check inside the VM with `modinfo cdc_ether`; it must print the module, not "not found". ::: ## 3. Give the VM the USB port and start it ```bash qm set 108 -usb0 host=1-7 # the bus-port from step 1; usb1, usb2 … for more sticks qm start 108 ``` In the web UI this is **VM → Hardware → Add → USB Device → Use USB Port**. Do this while the VM is stopped; USB hot-plug into a running VM is only supported for `q35` machines. Check that the VM got it: ```bash qm monitor 108 <<< "info usb" # Device 1.1, Port 1, Speed 480 Mb/s, Product HUAWEI_MOBILE, ID: usb0 ``` ## 4. Inside the VM: install the agent Log in (`ssh root@192.168.1.50`) and confirm the stick is there: ```bash apt-get install -y usb-modeswitch usbutils # usb-modeswitch: in case the host did not flip the stick lsusb | grep -i huawei # ID 12d1:14dc … HiLink Modem/Networkcard ip -br link # enx0c5b8f279a64 DOWN 0c:5b:8f:27:9a:64 ← the stick ``` The interface is `DOWN` with no address. That is normal, the agent configures it. Now run the one-line installer from the panel (**Nodes → Add a box**), as root: ```bash curl -fsSL https://proxykite.com/install.sh | sudo bash -s -- --key XXXX-XXXX-XXXX-XXXX # Downloading hostyourproxy-linux-amd64 ... # Registered as node 2. Service hostyourproxy.service is running. ``` Then: ```bash hostyourproxy status # Version: 1.9.2 Tunnel: connected Last OK heartbeat: 3s ago # Interfaces: # enx0c5b8f279a64 0c:5b:8f:27:9a:64 192.168.8.11/24 gw 192.168.8.1 up auto # Dongles: # #10 enx0c5b8f279a64 192.168.8.11 enabled users=1 ``` The stick needs about **30 s** after the agent starts: the agent gives the interface a temporary address, reads the stick's identity, gets a DHCP lease from it and registers it with the panel. Until then the journal shows `hilink probe: unreachable: the interface has no IPv4 address yet`. That is expected, not an error. Watch it with `journalctl -fu hostyourproxy`. The proxy now appears in the panel under **Proxies** with its host, port, login and rotation link. ## 5. Check it From any machine, with the login from the panel: ```bash curl -x http://USER:PASS@ind1.proxykite.com:30003 https://api.ipify.org # prints the SIM's public IP ``` Then press **Rotate** on the proxy page (or call the rotation link) and run the same curl again: the IP changes. **Reboot box** on the node page reboots the VM from the panel; the agent and the stick come back on their own. ## Two or more Huawei E3372 sticks :::warning Do this before you plug in the second E3372 stick Every Huawei E3372 has **the same MAC address**. With one stick, it gets a name like `enx0c5b8f279a64`. With two or more, only one stick can get that name; the others keep a kernel name such as `eth0` or `eth1`. On a Proxmox VM set up with cloud-init, the network config (netplan) renames the VM's own virtio network card to `eth0` at boot. If a stick already holds `eth0`, the rename fails, the VM's LAN card gets no IP address and **the box drops off the panel** until you fix it from the Proxmox console. ::: The fix: give the VM's LAN card a name that is not `ethN` (we use `lan0`), matched by its MAC address, and stop cloud-init from rewriting the network config at boot. Run this inside the VM as root, from the Proxmox console (**VM → Console**) rather than SSH, because the network restarts. **1.** Note the MAC address of the VM's own network card (the virtio card, **not** an `enx…` stick): ```bash ip -br link # eth0 UP bc:24:11:aa:bb:cc <- the VM's LAN card (also shown in Proxmox: VM → Hardware → Network Device) # enx0c5b8f279a64 DOWN 0c:5b:8f:27:9a:64 <- a stick ``` **2.** Turn off cloud-init's network config, so it does not put the `eth0` rename back at the next boot: ```bash cat > /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg <<'CFG' network: {config: disabled} CFG ``` **3.** Replace cloud-init's netplan file with your own. Put in your card's MAC and your own address and gateway (or `dhcp4: true` instead of the `addresses` and `routes` lines): ```bash mkdir -p /root/netplan-backup && mv /etc/netplan/*.yaml /root/netplan-backup/ cat > /etc/netplan/01-lan0.yaml <<'YAML' network: version: 2 ethernets: lan0: match: macaddress: "bc:24:11:aa:bb:cc" set-name: lan0 addresses: [192.168.1.50/24] routes: - to: default via: 192.168.1.1 nameservers: addresses: [1.1.1.1, 8.8.8.8] YAML chmod 600 /etc/netplan/01-lan0.yaml netplan generate # prints nothing when the file is valid reboot ``` **4.** After the reboot, check that the card is called `lan0`, has its address and the box is online: ```bash ip -br addr show lan0 # lan0 UP 192.168.1.50/24 hostyourproxy status # Tunnel: connected ``` Now shut the VM down, pass the second stick's USB port through ([step 3](#3-give-the-vm-the-usb-port-and-start-it)) and start it again. The sticks can take any `ethN` or `enx…` name they like; the agent finds them by IMEI. ## Notes and troubleshooting - **The stick's USB path inside the VM changes after a reboot** (`usb:2-1` one boot, `usb:1-1` the next). This is QEMU renumbering its virtual hubs; the agent re-identifies the stick by IMEI and keeps its proxy settings. - **The very first request after the stick comes up (or after a reboot) answered 403.** The proxy shows _online_ as soon as the stick answers, a few seconds before the SIM's data session is up. In that window the stick's own DNS answers every name with its own address (`192.168.8.1`), which the agent refuses as a private destination, hence a 403 for that one request. Every request after it succeeded. Give a new or rebooted box \~10 s after the proxy appears before you point traffic at it. - **`modinfo cdc_ether` says "not found"**: you are on a cloud kernel. `apt-get install linux-image-amd64` and reboot, or rebuild the VM from a generic image. - **No proxy appears, `ip -br link` shows no `enx…`**: the VM did not get the stick. On the host run `qm monitor <<< "info usb"`; if the stick is missing, another VM holds it (see the warning in step 1) or the port name is wrong (`lsusb -t` again). - **The stick shows as `12d1:1f01`**: it is still in CD-ROM mode. `usb_modeswitch -v 12d1 -p 1f01 -J` inside the VM, or install `usb-modeswitch` there (it then flips every future plug automatically). - **Memory.** The agent idles at \~30 MB. If your host is oversubscribed, keep the VM's minimum (balloon) at 512 MB; it ran fine for us at 667 MB usable. - **Backups.** Back the VM up like any other; the licence is bound to this box. If you rebuild the VM, click **Release machine** on the node page first, then run the installer again on the new VM. ## What we measured (Proxmox VE 8.3, Debian 13, E3372h, 1 vCPU / 1 GB) | Step | Time | | -------------------------------------------------- | -------------------------------- | | Installer (download + register + service up) | \~10 s | | Stick registered and proxy online in the panel | \~35 s after the service started | | IP rotation from the panel | \~10 s | | Reboot box from the panel until the proxy was back | \~45 s | | Test requests through the proxy (5 HTTPS sites) | all 200, 1.2–2.8 s each | --- url: https://proxykite.com/docs/guide/proxy-formats.md --- > For AI agents: the complete documentation index is available at https://proxykite.com/docs/llms.txt, the full documentation bundle is available at https://proxykite.com/docs/llms-full.txt. # Proxy formats Every proxy is one public **host:port** on our cloud router (ports 30000–30999). The same port speaks **HTTP and SOCKS5**: the protocol is detected from the first byte, so use whichever your tool supports. You can also give a proxy [separate HTTP and SOCKS5 ports](https://proxykite.com/docs/api/ports.md) and pick the numbers yourself. Each proxy has one or more proxy users (username + password). You find them in the panel, in [`GET /proxies/{id}`](https://proxykite.com/docs/api/proxies.md) (`users[]`, including ready-made `http` and `socks5` URLs) and in [`GET /export`](https://proxykite.com/docs/api/export.md). ## Connection strings Using host `ind1.proxykite.com`, port `30007`, user `u7abc`, password `s3cret`: | Format | Example | Where | | ------------------- | ------------------------------------------------ | ------------------------------------------------ | | `ip:port@user:pass` | `ind1.proxykite.com:30007@u7abc:s3cret` | proxies table in the panel; export `hostport_at` | | `ip:port:user:pass` | `ind1.proxykite.com:30007:u7abc:s3cret` | export `hostport` (most proxy checkers / bots) | | `user:pass@ip:port` | `u7abc:s3cret@ind1.proxykite.com:30007` | export `userpass` | | HTTP URL | `http://u7abc:s3cret@ind1.proxykite.com:30007` | `users[].http`, CSV `http_url` | | SOCKS5 URL | `socks5://u7abc:s3cret@ind1.proxykite.com:30007` | `users[].socks5`, CSV `socks5_url` | For SOCKS5, prefer `socks5h://` in tools that support it (curl, Python requests): DNS is then resolved through the proxy, on the mobile network, instead of on your machine. ## Using the proxy **curl** ```bash # HTTP proxy curl -x 'http://u7abc:s3cret@ind1.proxykite.com:30007' https://api.ipify.org # SOCKS5 proxy (DNS through the proxy) curl -x 'socks5h://u7abc:s3cret@ind1.proxykite.com:30007' https://api.ipify.org ``` **Python** ```python import requests # SOCKS needs: pip install "requests[socks]" proxy = "http://u7abc:s3cret@ind1.proxykite.com:30007" # or "socks5h://u7abc:s3cret@ind1.proxykite.com:30007" r = requests.get("https://api.ipify.org", proxies={"http": proxy, "https": proxy}, timeout=30) print(r.text) ``` **Node.js** ```js // npm i undici (HTTP proxy) · for SOCKS5 use the socks-proxy-agent package import { fetch, ProxyAgent } from 'undici'; const dispatcher = new ProxyAgent('http://u7abc:s3cret@ind1.proxykite.com:30007'); const res = await fetch('https://api.ipify.org', { dispatcher }); console.log(await res.text()); ``` **PHP** ```php true, CURLOPT_PROXY => 'ind1.proxykite.com:30007', CURLOPT_PROXYUSERPWD => 'u7abc:s3cret', CURLOPT_PROXYTYPE => CURLPROXY_HTTP, // or CURLPROXY_SOCKS5_HOSTNAME CURLOPT_TIMEOUT => 30, ]); echo curl_exec($ch); ``` ## Whitelisted IPs (no password) Client IPs on a proxy's [whitelist](https://proxykite.com/docs/api/whitelist.md) may connect **without** a username and password, over HTTP or SOCKS5 (no-auth). Everyone else must authenticate. ```bash # from a whitelisted IP curl -x 'http://ind1.proxykite.com:30007' https://api.ipify.org ``` ## Limits per user Each proxy user has a `max_conn` (concurrent connections, shown in `users[]`). A disabled user (`enabled: false`) or a disabled proxy (`enabled: false`, see `disabled_reason`) refuses connections. --- url: https://proxykite.com/docs/guide/rotation-links.md --- > For AI agents: the complete documentation index is available at https://proxykite.com/docs/llms.txt, the full documentation bundle is available at https://proxykite.com/docs/llms-full.txt. # Rotation links Every proxy has a secret **rotation link** that changes its IP without an API token. It is the `rotation_url` field of the [proxy object](https://proxykite.com/docs/api/proxies.md) and is shown on the proxy's page in the panel: ``` https://proxykite.com/r/ ``` Anyone who has the link can rotate that one proxy, so treat it like a password. ## Rotating Send a **GET** or a **POST**: either one rotates the IP straight away. The call waits for the rotation to finish (up to about 60 seconds), so use a client timeout of at least 90 s. **curl** ```bash curl -X POST 'https://proxykite.com/r/' # or simply open it (GET): curl 'https://proxykite.com/r/' ``` **Python** ```python import requests r = requests.post("https://proxykite.com/r/", timeout=90) print(r.status_code, r.json()) ``` **Node.js** ```js const res = await fetch('https://proxykite.com/r/', { method: 'POST', signal: AbortSignal.timeout(90_000), }); console.log(res.status, await res.json()); ``` **PHP** ```php '); curl_setopt_array($ch, [CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 90]); $body = curl_exec($ch); var_dump(curl_getinfo($ch, CURLINFO_HTTP_CODE), json_decode($body, true)); ``` ## Link previews Opening the link rotates, so a chat app, mail scanner or link previewer that opens a pasted link with GET rotates the IP too. A `HEAD` request (what many link checkers send) does not rotate: it answers `204` and is only logged. Every request shows up in the proxy's **Rotation link access log** with its IP and user agent. To stop strangers, turn on **Only allow the rotation link from these IPs** on the proxy's Rotation tab, and keep the link out of chats. A `?confirm=1` left over in older scripts is ignored. ## Answers | Status | Body | | ------ | --------------------------------------------------------------------------------------------------- | | 200 | `{"ok": true, "old_ip": "100.64.1.2", "new_ip": "100.64.9.8"}` | | 403 | `dongle_disabled`: the proxy is disabled; `ip_not_allowed`: your IP is not on the link's allow list | | 404 | `not_found`: unknown link (for example after a reset in the panel) | | 409 | `rotation_in_progress`: another rotation of this proxy is running | | 429 | `rate_limited`: more than 6 per minute for this link, or 30 per minute from your IP | | 501 | `not_implemented`: this dongle cannot rotate this way | | 502 | `rotation_failed`: the dongle did not get a new IP | Every error body is `{"ok": false, "error": "", "message": "…"}`. ## Link or API? | | Rotation link | [API rotate](https://proxykite.com/docs/api/rotation.md) | | ---------- | ----------------------------- | -------------------------------------------------------- | | Auth | the secret in the URL | bearer token (`rotate` level) | | Scope | one proxy | every proxy the login can see | | Answer | `ok`, `old_ip`, `new_ip` | also `method`, `duration_ms` | | Rate limit | 6/min per link, 30/min per IP | 120/min per login | --- url: https://proxykite.com/docs/guide/supported-dongles.md --- > For AI agents: the complete documentation index is available at https://proxykite.com/docs/llms.txt, the full documentation bundle is available at https://proxykite.com/docs/llms-full.txt. # Supported dongles These 4G USB sticks are tested with ProxyKite and fully controlled from the panel: | Dongle | Since | Proxy | IP rotation | SMS | Network mode | Dongle web UI | | ---------------------------------------------------------- | ------------------------- | ----- | --------------------- | --- | ------------ | ------------- | | **Huawei E3372** (E3372h / E3372-320, **HiLink** firmware) | first release | yes | yes, about 10 s | yes | yes | yes | | **ZTE MF833T** | agent 1.10.0 (2026-10-27) | yes | yes, about 10 to 30 s | yes | yes | yes | Plug the stick into your box (or pass it through to your [Proxmox VM](https://proxykite.com/docs/guide/proxmox.md)). The agent detects the model by itself, reads the stick's IMEI and gives it a proxy port. The IMEI is the stick's identity: if you move it to another USB port or another of your boxes, it keeps its proxy settings. ## Huawei E3372 (HiLink) Use the **HiLink** firmware: the stick shows up as a network card (USB ID `12d1:14dc`). Several E3372 sticks work side by side on one box. :::warning Two or more E3372 sticks in a Proxmox / cloud-init VM Every E3372 has the same MAC address, which can make a second stick take the name your VM's own network card expects. Follow [the fix in the Proxmox guide](https://proxykite.com/docs/guide/proxmox.md#two-or-more-huawei-e3372-sticks) **before** you plug in the second stick. ::: ## ZTE MF833T - **Needs agent 1.10.0 or newer** on the box. To upgrade, run the install one-liner from the panel (**Nodes → Add a box**) again on the box. `hostyourproxy status` shows the version. - Detected automatically (USB ID `19d2:1405`; if it shows as `19d2:1225` it is still in storage mode, install `usb-modeswitch` so it flips). No setup in the panel. - Works from the panel and the [API](https://proxykite.com/docs/api/proxies.md#device-type-and-capabilities) like a Huawei stick: proxying, IP rotation, rotation links, SMS (read, send, delete), [network mode](https://proxykite.com/docs/api/network-mode.md) and the dongle's own web UI. In the API its `device.type` is `zte`. - **IP rotation is slower than on the E3372: roughly 10 to 30 s.** Most of that time is the modem itself dropping the old data session and re-attaching to the mobile network, which software cannot speed up. Give rotation clients a generous timeout (we recommend 180 s, see [Rotation](https://proxykite.com/docs/api/rotation.md)). - On some carriers the public IP stays the same after a new data session. The panel then reboots the stick, which gives a new IP but takes about 70 s. - USSD codes (`*123#`) are not available on this stick. ## Other dongles Other USB modems, Android phones and plain network interfaces can be adopted as proxies, but the panel controls them less (see [device type and capabilities](https://proxykite.com/docs/api/proxies.md#device-type-and-capabilities)). If you want a specific model supported, write to [support@proxykite.com](mailto:support@proxykite.com). --- url: https://proxykite.com/docs/guide/webhooks.md --- > For AI agents: the complete documentation index is available at https://proxykite.com/docs/llms.txt, the full documentation bundle is available at https://proxykite.com/docs/llms-full.txt. # Webhooks Webhooks POST a signed JSON message to your URL when something happens on your account. Add them in the panel under **Webhooks** (up to 10 per login), pick the events, and copy the **secret** used to sign deliveries. The **Test** button sends a `webhook.test` event. ## Events | Event | When | `data` fields | | ------------------------ | -------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | | `rotation.completed` | a rotation finished, successfully or not (API, link, panel or auto-rotate) | `proxy_id`, `label`, `port`, `status`, `ok`, `old_ip`, `new_ip`, `method`, `duration_ms`, `triggered_by`, `error` | | `node.online` | a node (your box) came back online | `node_id`, `hostname`, `online`, `last_seen_at` | | `node.offline` | a node stopped sending heartbeats | `node_id`, `hostname`, `online`, `last_seen_at` | | `quota.exceeded` | a proxy used up its traffic quota (once per crossing) | `proxy_id`, `label`, `port`, `quota_bytes`, `used_bytes`, `assigned_user_id` | | `proxy.address_changing` | your node is scheduled to move to another cloud router (sent when planned) | `node_id`, `from_host`, `to_host`, `switch_at`, `proxies` (`id`, `host`, `new_host`, `port`, `new_port`) | | `proxy.address_changed` | the move finished; the proxies answer on the new host | same as above | | `webhook.test` | the Test button in the panel | `message` | A webhook with no events selected receives all of them. Reseller sub-users with their own webhooks receive `rotation.completed` and `quota.exceeded` for the proxies assigned to them. ## Delivery ```http POST /your/endpoint HTTP/1.1 Content-Type: application/json User-Agent: ProxyKite-Webhooks/1 X-Hyp-Event: rotation.completed X-Hyp-Delivery: 5f0c6a1e-8a1b-4c55-9d1e-2b7f1c3d9a10 X-Hyp-Timestamp: 1791914400 X-Hyp-Signature: sha256=3b6f...e91c ``` ```json {"id": "5f0c6a1e-8a1b-4c55-9d1e-2b7f1c3d9a10", "event": "rotation.completed", "created_at": "2026-10-09T18:00:00+00:00", "data": {"proxy_id": 7, "label": "Shop A", "port": 30007, "status": "ok", "ok": true, "old_ip": "1.2.3.4", "new_ip": "5.6.7.8", "method": "netmode", "duration_ms": 9000, "triggered_by": "api", "error": null}} ``` - **One attempt, 5 second timeout, no retries, redirects not followed.** Answer with any `2xx` quickly and do the work afterwards. Anything else is logged as a failed delivery (visible in the panel). - `id` (= `X-Hyp-Delivery`) is unique per delivery; use it to ignore duplicates. - URLs must be public `http(s)` addresses; private, loopback and link-local targets are refused. ## Verifying the signature `X-Hyp-Signature` is `sha256=` + hex HMAC-SHA256 of `"."`, keyed with the webhook's secret. Always verify against the **raw** body (before JSON parsing), compare in constant time, and reject old timestamps (we suggest 5 minutes). **Python** ```python import hashlib, hmac, os, time from flask import Flask, request, abort app = Flask(__name__) SECRET = os.environ["HYP_WEBHOOK_SECRET"].encode() @app.post("/hooks/hyp") def hyp_webhook(): ts = request.headers.get("X-Hyp-Timestamp", "") sig = request.headers.get("X-Hyp-Signature", "") body = request.get_data() # raw bytes expected = "sha256=" + hmac.new(SECRET, ts.encode() + b"." + body, hashlib.sha256).hexdigest() if not ts.isdigit() or abs(time.time() - int(ts)) > 300 or not hmac.compare_digest(expected, sig): abort(401) event = request.get_json() print(event["event"], event["data"]) return "", 204 ``` **Node.js** ```js import crypto from 'node:crypto'; import express from 'express'; const app = express(); const SECRET = process.env.HYP_WEBHOOK_SECRET; app.post('/hooks/hyp', express.raw({ type: 'application/json' }), (req, res) => { const ts = req.get('X-Hyp-Timestamp') ?? ''; const sig = req.get('X-Hyp-Signature') ?? ''; const expected = 'sha256=' + crypto.createHmac('sha256', SECRET).update(`${ts}.`).update(req.body).digest('hex'); const fresh = Math.abs(Date.now() / 1000 - Number(ts)) < 300; const ok = sig.length === expected.length && crypto.timingSafeEqual(Buffer.from(sig), Buffer.from(expected)); if (!fresh || !ok) return res.sendStatus(401); const event = JSON.parse(req.body.toString('utf8')); console.log(event.event, event.data); res.sendStatus(204); }); app.listen(3000); ``` **PHP** ```php 300 || ! hash_equals($expected, $sig)) { http_response_code(401); exit; } $event = json_decode($body, true); error_log($event['event'] . ' ' . json_encode($event['data'])); http_response_code(204); ``` **curl (test)** ```bash # Send yourself a correctly signed test delivery SECRET='your-webhook-secret' BODY='{"id":"test-1","event":"webhook.test","created_at":"2026-10-09T18:00:00+00:00","data":{"message":"hi"}}' TS=$(date +%s) SIG="sha256=$(printf '%s.%s' "$TS" "$BODY" | openssl dgst -sha256 -hmac "$SECRET" -hex | sed 's/^.* //') curl -X POST http://localhost:3000/hooks/hyp -H 'Content-Type: application/json' \ -H "X-Hyp-Event: webhook.test" -H "X-Hyp-Timestamp: $TS" -H "X-Hyp-Signature: $SIG" -d "$BODY" ``` ## Field notes - `rotation.completed` → `status` is `ok`, `failed` or `not_implemented`; `ok` is `true` only for `ok`; `error` is set when it failed. `triggered_by` is where the rotation came from: `api`, `link`, `panel`, `auto`. - `quota.exceeded` fires once when `used_bytes` reaches `quota_bytes`, and again only after the quota is reset or raised. --- url: https://proxykite.com/docs/index.md --- > For AI agents: the complete documentation index is available at https://proxykite.com/docs/llms.txt, the full documentation bundle is available at https://proxykite.com/docs/llms-full.txt. # ProxyKite API Mobile proxies, under your control > Rotate IPs, manage credentials and whitelists, read usage and SMS, and get webhooks, all from your own code. [Get started](/guide/getting-started) | [API reference](/api/proxies) | [Use with AI](/guide/ai-agents) ## Features - [**REST API**](/guide/getting-started): JSON over HTTPS at https://proxykite.com/api/v1 with bearer tokens you create in the panel. - [**Rotation links**](/guide/rotation-links): One secret URL per proxy that rotates its IP, no token needed. Handy for scripts and automated tests. - [**HTTP and SOCKS5**](/guide/proxy-formats): Every proxy port speaks both protocols. Copy-paste connection strings for any tool. - [**Webhooks**](/guide/webhooks): Signed POSTs when a rotation finishes, a node goes online or offline, or a quota runs out. - [**Use with AI**](/guide/ai-agents): One instruction for ChatGPT, Claude or any agent, plus llms.txt and a Copy Markdown button on every page.