# Quickstart

> **For agents:** the whole flow is three calls: `whoami()` → `list_projects(org="acme")` → `list_keys(org="acme", project="web")`. If there is no project yet, `create_project(org="acme", slug="web", name="Web", platform="node")` returns a DSN directly.

## 1. Create an organization

Sign up at `https://app.bugwatch.io` with email + password (10+ characters) or with Google, GitHub, or Microsoft. Password signup creates your organization in the same step; social and magic-link sign-ins ask for an org name and slug right after. You become its **owner** on the Free plan (100,000 events/month, 30-day retention, up to 3 billable members, unlimited free viewers).

The same thing over the API:

```sh
curl -sS https://api.bugwatch.io/auth/signup -H 'content-type: application/json' \
  -d '{"email":"you@example.com","password":"correct-horse-battery","orgName":"Acme","orgSlug":"acme"}'
```

## 2. Create a project and get its DSN

In the dashboard: **Projects → New project**, pick the platform. Or with an API token that has `project:write`:

```sh
curl -sS https://api.bugwatch.io/v1/orgs/acme/projects \
  -H 'Authorization: Bearer bwt_…' -H 'content-type: application/json' \
  -d '{"slug":"web","name":"Web","platform":"nextjs"}'
# → {"id":"01J…","slug":"web","projectNumber":1001,"dsn":"https://<key>@ingest.bugwatch.io/1001"}
```

The DSN is also listed under the project's settings and by `list_keys`. Tokens are minted by a human in **Settings → API tokens** (shown once, prefix `bwt_`); see [Tokens & scopes](https://docs.bugwatch.io/agents/tokens-and-scopes.md).

## 3. Point your SDK at it

Install the official Sentry SDK for your platform ([all 29 platforms](https://docs.bugwatch.io/sdks/overview.md)) and use the Bugwatch DSN:

```js
import * as Sentry from "@sentry/node";
Sentry.init({ dsn: "https://<key>@ingest.bugwatch.io/1001", release: process.env.RELEASE });
Sentry.captureException(new Error("hello bugwatch"));
```

Already on a Sentry SDK? Change only the `dsn` value. Environment, release, tags, breadcrumbs, and transactions all carry over unchanged.

## 4. See the first event

Within about 30 seconds the event is grouped into an issue:

```sh
curl -sS -H 'Authorization: Bearer bwt_…' \
  'https://api.bugwatch.io/v1/orgs/acme/projects/web/issues?status=unresolved'
```

Or open `https://app.bugwatch.io/o/acme/p/web/issues`. Over MCP: `search_issues(org="acme", project="web", status="unresolved")`.

If nothing shows up: check the response from ingest (`401` unknown key, `403` disabled key, `429` over quota, `413` envelope larger than 1 MB decoded) and that the project number in the DSN path matches the key's project.

## 5. Next steps

- Upload source maps so minified frames resolve: [Source maps](https://docs.bugwatch.io/sdks/source-maps.md).
- Wire alerts: `create_channel` + `create_alert_rule`, or [Alerts](https://docs.bugwatch.io/product/alerts.md).
- Connect your coding agent: [Connect an agent](https://docs.bugwatch.io/agents/connect.md).
