# API

Use the CrossWatch API to integrate CrossWatch into your own workflows.

CrossWatch is self-hosted. The API is served by *your* CrossWatch instance.

It’s not a public, multi-tenant API.

### API topics

* Maintenance actions and endpoints: [Maintenance](/crosswatch/maintenance.md)
* Legacy inbound endpoints (deprecated): [Webhooks](/crosswatch/scrobble/webhooks.md)

### Base URL

Your base URL depends on where you host CrossWatch.

Examples:

* `http://localhost:8787` (local dev)
* `https://crosswatch.<your-domain>` (behind a reverse proxy)

Use HTTPS when exposed beyond localhost. Requests and responses are JSON.

### Common endpoints

These endpoints are useful for automation and debugging.

#### Provider instances (profiles)

* `GET /api/provider-instances` — list instances for all providers.
* `GET /api/provider-instances/{provider}` — list instances for one provider.
* `POST /api/provider-instances/{provider}/next` — create `PROV-P##` (optionally copy).
* `DELETE /api/provider-instances/{provider}/{instance_id}` — delete an instance (not `default`).

Related: [Profiles and instances](/crosswatch/profiles.md)

#### Watcher (routes mode)

* `GET /api/watch/status` — routes + group status.
* `POST /api/watch/start` — start watcher from config.
* `POST /api/watch/stop` — stop watcher.
* `GET /api/watch/logs` — tail watch logs.

#### Insights

* `GET /api/insights` — insights payload (the dashboard aggregates this).

Related: [Insights](/crosswatch/navigation/insights.md)

[Open API reference](https://api.crosswatch.app)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.crosswatch.app/blueprint-architecture/api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
