- API Reference
- Box API
- Modems
Swap two slots so a modem moves to another slot number
Use this to reorder modems. Swaps the device data of the two positions; ports, VLESS/Shadowsocks credentials and other slot-bound settings stay with the slot number. Both slots' proxies are taken down and brought up again. Both positions must exist within the licensed modem count.
/v2/change_positionRequest body application/json · required
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
Result; msg is empty on success.
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 |
|---|---|---|
Invalid position | A position is below 1 or above the licensed modem count. | Use positions within the license. |
Positions are the same | from_position equals to_position. | Pick two different slots. |
Position info not found | A slot has no record yet. | Use slots shown in the panel. |