Skip to main content

Create Rotation Schedule

POST/api/v1/admin/proxy/schedules
note

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_idstring

UUID of location to schedule rotation for (all modems)

modem_idstring

UUID of specific modem to schedule rotation for

interval_minutesintegerrequired

Interval between rotations in minutes (min: 5, max: 1440)

rotation_methodstringdefault: reconnect

Rotation method: reconnect, airplane, or reboot

is_enabledbooleandefault: true

Whether to enable the schedule immediately

Response

schedule_idstring

UUID of the created schedule

interval_minutesinteger

Configured rotation interval

next_run_atstring

ISO 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_id or modem_id should be provided
  • The schedule starts immediately after creation
  • First rotation occurs after interval_minutes from creation time
  • Use reconnect for fastest rotation (~10s), airplane for most reliable (~30s)