API Reference
Dashboard
  1. API Reference
  2. Box API
  3. Modems

Set the APN of one or more modems

Use this when a SIM needs a specific APN to get data. Saves the APN for each modem's label and applies it to the modem; result lists which positions succeeded and failed. status is true even when some positions failed. The modem reconnects with the new APN. The request contains the APN password.

  • Destructive · confirm first
  • Basic auth
  • Panel API · since v20.8.0
  • Hub: needs owner approval
  • changeApn
POST/v2/change_apn

Request body application/json · required

positionsinteger[]required
apnobjectrequired

APN settings. Stored per modem label and applied to the modem.

apn.auto_apnintegeroptional

1 lets the box detect the APN from the SIM; 0 uses the values below.

One of 0, 1
apn.apn_namestringrequired

APN name given by the carrier.

apn.ip_typeintegeroptional

0 dual stack, 1 IPv4 only, 2 IPv6 only.

One of 0, 1, 2
apn.auth_typestringoptional
One of NONE, PAP, CHAP
apn.auth_userstringoptional
apn.auth_passstringoptional
apn.persist_configintegeroptional

1 re-applies the APN every time the modem connects.

One of 0, 1

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

Outcome per position, or the generic error.

statusbooleanoptional
msgstringoptional
resultobjectoptional
result.successinteger[]optional
result.failedinteger[]optional

Errors returned in msg

msgMeaningWhat to do
Sent change APN failed. Please try again later!positions or apn missing.Send both fields.
APN changed for N devices. M failed.Some positions are empty or the modem rejected the APN.Check result.failed and the modem type.
Verified against XProxy v21.3.2 on Nov 17, 2026