- API Reference
- Box API
- Rotation
Get a new public IP for a proxy given its port number
Use this when you only know the port. Same result codes as the other rotation operations. A missing or non-integer port answers HTTP 500.
/reset_by_portRequest body application/json · required
HTTP or SOCKS5 port of the proxy.
Authentication
Always needs a trusted caller (loopback, LAN unless "force auth for local" is on, whitelisted IP, allowed Tailscale) or valid dashboard Basic credentials, which are checked only when dashboard authentication is enabled.
Responses
Rotation accepted or refused.
True when the box accepted the request.
Outcome code or message (see the operation's error table).
The caller is not trusted (not loopback, LAN, whitelisted or allowed Tailscale) and sent no valid Basic credentials. The body depends on whether "Basic auth for all API" is on. Routes that also use the panel login can answer a plain-text 401 "Unauthorized Access" instead.
Unhandled error, for example a non-integer position or a missing required parameter.
Error name, e.g. internal_server_error or bad_request.
Errors returned in msg
| msg | Meaning | What to do |
|---|---|---|
missing_proxy_parameter | proxy is missing. | Send proxy=HOST:PORT. |
invalid_format_proxy | proxy is not HOST:PORT. | Send proxy=HOST:PORT. |
command_sent | With status true, the rotation started. With status false, the modem did not accept the command. | On status false check the slot status before retrying. |
modem_resetting | A rotation is already running. | Wait for MODEM_READY. |
reset_too_much | Less than the minimum interval (5 seconds by default) since the last rotation. | Wait and retry. |
modem_disconnected | The modem type cannot rotate. | Check the modem in the panel. |
need_upgrade | The license does not include IP rotation. | Upgrade the license. |
slot_not_found | No slot uses this port. | Use a port from /api/v1/info_list. |
external_server_error | The external server did not answer. | Check that server or add internal=1. |