This endpoint requires Admin API Key authentication via the X-Admin-Key header.
Save the agent_api_key returned in the response! It’s needed to authenticate the SpiderHub agent and cannot be retrieved later.
Request Body
Short unique code (e.g., “ua-odesa-1”, “us-nyc-1”)
Human-readable name (e.g., “SpiderHub Odesa”)
ISO 3166-1 alpha-2 country code (e.g., “UA”, “US”)
Maximum number of modems this location can support
WireGuard VPN IP address for this location (e.g., “10.100.0.2”)
Response
UUID of the created location
The location code you specified
IMPORTANT: Save this key! Used by SpiderHub agent for authentication.
curl -X POST "https://spideriq.ai/api/v1/admin/proxy/locations" \
-H "X-Admin-Key: your_admin_key" \
-H "Content-Type: application/json" \
-d '{
"location_code": "ua-odesa-1",
"location_name": "SpiderHub Odesa",
"country_code": "UA",
"max_modems": 20,
"wireguard_ip": "10.100.0.2"
}'
{
"location_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"location_code": "ua-odesa-1",
"location_name": "SpiderHub Odesa",
"country_code": "UA",
"max_modems": 20,
"wireguard_ip": "10.100.0.2",
"agent_api_key": "your_generated_agent_key_save_this",
"status": "offline",
"created_at": "2025-01-01T10:00:00.000000",
"updated_at": "2025-01-01T10:00:00.000000"
}
Next Steps
After creating a location:
-
Configure SpiderHub with the
agent_api_key:
# SpiderHub/.env
SPIDERPROXY_API_URL=https://spideriq.ai
SPIDERPROXY_LOCATION_CODE=ua-odesa-1
SPIDERPROXY_AGENT_KEY=your_generated_agent_key_save_this
-
Start SpiderHub agent - it will begin sending heartbeats and registering modems
-
Monitor location status via the List Locations endpoint