- API Reference
- Box API
- Modems
Give one modem a new public IP from the panel
Use this to rotate the IP of one slot by its position. Starts the rotation and returns at once; the new IP arrives later. When "rotation delay before process" is set the rotation is scheduled and msg is empty. Refused when the modem was stopped, when the license has no IP rotation (except in slave mode), while the modem is already resetting, or when the slot rotated too often.
/v2/rotate_ipRequest body application/json · required
Slot number (position) on the box, starting at 1. A missing or non-integer value makes the box answer HTTP 500.
Authentication
Needs dashboard Basic credentials when dashboard authentication is enabled; trusted callers (loopback, LAN unless "force auth for local" is on, whitelisted IP, allowed Tailscale) pass without them.
Responses
Rotation started, or a refusal with status false.
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 |
|---|---|---|
MODEM_STOPPED | The modem was stopped (by the user or Smart IP Guard). | Connect it with POST /v2/connect_dongle first. |
need_upgrade | The license does not include IP rotation. | Upgrade the license plan. |
slot_not_found | No modem at this position. | Use a position from GET /v2/dongle_device_list. |
modem_disconnected | The modem has no connection to rotate. | Reboot the modem and try again. |
modem_resetting | A rotation is already running on this slot. | Wait until it finishes. |
reset_too_much | The slot rotated too recently (per-port rotation limit). | Wait for the minimum rotation interval and try again. |