API Overview
Base URL
The Spotrun API is available at:
https://api.spot.run/api
API Format
All API endpoints:
- Accept and return JSON
- Use standard HTTP methods (GET, POST, PUT, DELETE)
- Return appropriate HTTP status codes
- Include CORS headers for browser access
Authentication
Most API endpoints require authentication via:
- Session cookies (for console users)
- API keys (for programmatic access)
- Agent tokens (for CLI utility access)
Response Format
Successful responses:
{
"success": true,
"data": {}
}
Error responses:
{
"error": "Error message"
}
HTTP Status Codes
200 OK: Request succeeded201 Created: Resource created successfully400 Bad Request: Invalid request parameters401 Unauthorized: Authentication required403 Forbidden: Insufficient permissions404 Not Found: Resource not found500 Internal Server Error: Server error
Rate Limiting
API requests are rate limited to prevent abuse. Limits are applied per:
- API key
- IP address
- User account
If you exceed the rate limit, you'll receive a 429 Too Many Requests response.