> ## Documentation Index
> Fetch the complete documentation index at: https://docs.squasher.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# API reference

> Authenticate with the Squasher API and understand its main endpoint families.

Squasher exposes separate base URLs for API requests and ingestion traffic.

## Base URLs

```text theme={null}
https://api.squasher.ai
https://ingest.squasher.ai
```

## OpenAPI

The public REST API contract is available as OpenAPI 3.1 JSON.

```text theme={null}
https://api.squasher.ai/openapi.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](/api-reference/versioning) for compatibility rules and the `Deprecation` and `Sunset` signals used during a migration.

## Authentication

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

```bash theme={null}
curl https://api.squasher.ai/v1/projects \
  -H "x-squasher-key: sq_pk_your_key_here"
```

## Main endpoint families

* [Workflow API map](/api-reference/workflow-apis)
* [Ingestion API](/api-reference/ingest)
* [Projects API](/api-reference/projects)
* [Query Guide API](/api-reference/query-guide)
* [Events API](/api-reference/events), [Logs API](/api-reference/logs), [Metrics API](/api-reference/metrics), and [Traces API](/api-reference/traces)
* [Error groups API](/api-reference/errors), [Replays API](/api-reference/replays), and [Web Vitals API](/api-reference/vitals)
* [Dashboards API](/api-reference/dashboards) and [Observability Summary API](/api-reference/observability-summary)
* [AI Observability API](/api-reference/ai-observability), [Agent Observations API](/api-reference/agent-observations), and [Agent Runs API](/api-reference/agent-runs)
* [Monitors API](/api-reference/monitors), [Incidents API](/api-reference/incidents), [Alerts API](/api-reference/alerts), and [Automations API](/api-reference/automations)
* [Status Pages API](/api-reference/status-pages) and [Subscribers API](/api-reference/subscribers)
* [Source Maps API](/api-reference/sourcemaps), [Log Connectors API](/api-reference/log-connectors), [Provider Connections API](/api-reference/provider-connections), [Provider Capabilities API](/api-reference/provider-capabilities), and [Integrations API](/api-reference/integrations)
* [GitHub API](/api-reference/github), [Billing API](/api-reference/billing), and [API Keys API](/api-reference/api-keys)

## For agents

Use the API when you are generating integration code or need stable JSON contracts. Use [MCP](/integrations/mcp) when the assistant needs live workspace data and can call tools. Use the [CLI](/integrations/cli-reference) 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.
