API Reference

Programmatically access CallScaler's features through the RESTful API.

Overview

CallScaler provides a RESTful API for programmatic access to all features. The API follows standard REST conventions with JSON request/response bodies. Use the API to build custom integrations, automate workflows, or embed call tracking in your own applications.

Base URL

All API requests are made to your CallScaler instance:

text
https://your-domain.com/api/v1/

Authentication

The API uses cookie-based authentication. First, authenticate with the login endpoint to get a session cookie, then include that cookie in subsequent requests.

shell
# Login
curl -X POST https://your-domain.com/api/v1/auth/login \
  -H 'Content-Type: application/json' \
  -d '{"email": "you@example.com", "password": "your-password"}' \
  -c cookies.txt

# Use the session cookie for subsequent requests
curl https://your-domain.com/api/v1/numbers \
  -b cookies.txt

Response Format

All responses are JSON. Successful responses return a 200 status code with the requested data. Errors return appropriate HTTP status codes (400, 401, 403, 404, 500) with an error message.

javascript
// Success response
{
  "numbers": [...],
  "total": 42
}

// Error response
{
  "error": "invalid request: missing required field 'name'"
}