Skip to main content

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 succeeded
  • 201 Created: Resource created successfully
  • 400 Bad Request: Invalid request parameters
  • 401 Unauthorized: Authentication required
  • 403 Forbidden: Insufficient permissions
  • 404 Not Found: Resource not found
  • 500 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.