- API Reference
- Box API
- Modems
Change the label number of a modem
Use this to give a modem a fixed label number (used for sorting and per-label settings such as APN). Hilink, ZTE, XProxy (XH20/XH22) and Alcatel modems store it on the device; other modems with a serial number store it in the box database. On success the modem reboots to apply it.
/v2/change_labelRequest body application/json · required
New label number.
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.
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.
Errors returned in msg
| msg | Meaning | What to do |
|---|---|---|
modem_not_found | No modem at this position. | Use a position from GET /v2/dongle_device_list. |
An error when changing Label | The modem rejected the label. | Reboot the modem and try again. |
Modem is not support for changing Label! | The modem has no serial number and no label support. | None; this modem type cannot be labelled. |
Sent change IMEI failed. Please try again later! | position or label missing or not an integer (the box reuses the IMEI text here). | Send both as integers. |