POST
https://spideriq.ai
/
api
/
v1
/
admin
/
proxy
/
modems
/
{modem_id}
/
rotate
curl -X POST "https://spideriq.ai/api/v1/admin/proxy/modems/{modem_id}/rotate?method=reconnect" \
  -H "X-Admin-Key: your_admin_key"
{
  "success": true,
  "command_id": "c1d2e3f4-a5b6-7890-cdef-123456789abc",
  "message": "Rotation command queued"
}
This endpoint requires Admin API Key authentication via the X-Admin-Key header.
IP rotation disconnects and reconnects the modem to obtain a new IP address from the carrier. The command is queued and executed by the SpiderHub agent on the next heartbeat cycle (typically within 30 seconds).

Path Parameters

modem_id
string
required
UUID of the modem to rotate

Query Parameters

method
string
default:"reconnect"
Rotation method:
  • reconnect - Disconnect and reconnect the data connection (fastest, ~10s)
  • airplane - Toggle airplane mode (more thorough, ~30s)
  • ussd - Send USSD code to force new IP (carrier-specific)

Response

success
boolean
required
Whether the command was queued successfully
command_id
string
required
UUID of the queued command for tracking
message
string
Human-readable status message
curl -X POST "https://spideriq.ai/api/v1/admin/proxy/modems/{modem_id}/rotate?method=reconnect" \
  -H "X-Admin-Key: your_admin_key"
{
  "success": true,
  "command_id": "c1d2e3f4-a5b6-7890-cdef-123456789abc",
  "message": "Rotation command queued"
}

Command Lifecycle

  1. Queued: Command is stored in the database with pending status
  2. Picked Up: SpiderHub agent receives command on next heartbeat (~30s)
  3. Processing: Agent executes the rotation method
  4. Completed: Agent reports success/failure back to central API
You can check command status via the modem list endpoint - last_rotation_at will be updated when complete.

Rotation Methods Compared

MethodSpeedReliabilityNotes
reconnect~10sHighDrops PPP connection, reconnects
airplane~30sVery HighFull radio reset, guaranteed new IP
ussdVariableCarrier-specificSome carriers support *99# etc.
IP rotation temporarily disconnects the modem. Any active connections through that proxy will be dropped.