Skip to main content
Squasher exposes separate base URLs for API requests and ingestion traffic.

Base URLs

OpenAPI

The public REST API contract is available as OpenAPI 3.1 JSON.
The API root at https://api.squasher.ai/ returns a compact JSON index with links to the docs, OpenAPI contract, and hosted MCP endpoint. See API versioning and deprecation for compatibility rules and the Deprecation and Sunset signals used during a migration.

Authentication

Send your API key in the x-squasher-key header.

Main endpoint families

For agents

Use the API when you are generating integration code or need stable JSON contracts. Use MCP when the assistant needs live workspace data and can call tools. Use the CLI when a terminal workflow is easier to audit. Agent sequence:
  1. Resolve the project with GET /v1/projects or squasher projects list.
  2. Discover the right query family with GET /v1/projects/{project_id}/query-guide.
  3. Use bounded from and to windows for telemetry queries.
  4. Prefer summary or inspect endpoints before raw event exports.
  5. Ask before write, destructive, key rotation, hosted run dispatch, or incident state changes.

Response behavior

Successful responses return JSON unless the operation documents an empty or non-JSON body. Common JSON error responses include a stable type, code, and safe message. They can also include param, doc_url, and retry_after. Some specialized endpoints still return a legacy error field with optional message and hint fields. The shared OpenAPI error schema documents both forms during this migration. Interactive OAuth sessions use the named mcp grant published in OpenAPI and the MCP authorization metadata. Workspace membership, project access, and roles still limit every request. API keys use the more specific project scopes documented by the API Keys resource.