Create Rotation Schedule
POST
/api/v1/admin/proxy/schedulesnote
This endpoint requires Admin API Key authentication via the X-Admin-Key header.
Creates a new scheduled rotation. You can schedule rotations for:
- All modems at a location: Provide
location_id - A specific modem: Provide
modem_id
Request Body
location_idstringUUID of location to schedule rotation for (all modems)
modem_idstringUUID of specific modem to schedule rotation for
interval_minutesintegerrequiredInterval between rotations in minutes (min: 5, max: 1440)
rotation_methodstringdefault: reconnectRotation method: reconnect, airplane, or reboot
is_enabledbooleandefault: trueWhether to enable the schedule immediately
Response
schedule_idstringUUID of the created schedule
interval_minutesintegerConfigured rotation interval
next_run_atstringISO timestamp of first scheduled rotation
Request Example
curl -X POST "https://spideriq.ai/api/v1/admin/proxy/schedules" \
-H "X-Admin-Key: your_admin_key" \
-H "Content-Type: application/json" \
-d '{
"location_id": "33333333-3333-3333-3333-333333333333",
"interval_minutes": 60,
"rotation_method": "reconnect"
}'
curl -X POST "https://spideriq.ai/api/v1/admin/proxy/schedules" \
-H "X-Admin-Key: your_admin_key" \
-H "Content-Type: application/json" \
-d '{
"modem_id": "11111111-1111-1111-1111-111111111111",
"interval_minutes": 30,
"rotation_method": "reconnect"
}'
import requests
response = requests.post(
"https://spideriq.ai/api/v1/admin/proxy/schedules",
headers={
"X-Admin-Key": "your_admin_key",
"Content-Type": "application/json"
},
json={
"location_id": "33333333-3333-3333-3333-333333333333",
"interval_minutes": 60,
"rotation_method": "reconnect"
}
)
print(response.json())
Response Example
{
"schedule_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"location_id": "33333333-3333-3333-3333-333333333333",
"modem_id": null,
"interval_minutes": 60,
"rotation_method": "reconnect",
"is_enabled": true,
"next_run_at": "2026-01-05T14:00:00Z",
"created_at": "2026-01-05T13:00:00Z"
}
Notes
- Only one of
location_idormodem_idshould be provided - The schedule starts immediately after creation
- First rotation occurs after
interval_minutesfrom creation time - Use
reconnectfor fastest rotation (~10s),airplanefor most reliable (~30s)