# Quick start

> Link a sandbox portal and read its data in three calls.

Create a free sandbox account on the [home page](https://sidelatch.com/#start), make an API key in the [console](https://sidelatch.com/account#keys), then link the Demo Carrier with the test login `agency1` / `pw1`.

1. **Create a link token on your backend.**

   **Shell**

   ```bash
   curl -X POST https://sidelatch.com/v1/link-tokens \
     -H "X-API-Key: $SIDELATCH_API_KEY" -H "Content-Type: application/json" \
     -d '{"user_id": "agency-42", "portal": "demo_carrier"}'
   ```

2. **Open the connect window on your page.**

   **HTML**

   ```html
   <script src="https://sidelatch.com/link.js"></script>
   <script>
     Sidelatch.create({
       token: linkToken,
       onSuccess(connectionId, meta) { /* send connectionId to your backend and save it */ },
       onExit(error) { /* the user closed the window */ },
     }).open();
   </script>
   ```

3. **Read their data from your backend.**

   **Shell**

   ```bash
   curl -X POST https://sidelatch.com/v1/connections/$CONNECTION_ID/run \
     -H "X-API-Key: $SIDELATCH_API_KEY" -H "Content-Type: application/json" \
     -d '{"operation": "list_policies"}'
   ```

## Sandbox

Sandbox accounts can link the sandbox portals only. Live portals need a live plan; we'll reach you at your signup email.

### Free and Pro: your own logins

Confirm your signup email and the account moves to the Free plan: you can link your own login on the real portals we've opened to personal accounts, and read it from the API or from Claude with a personal MCP link. Free and Pro are for one person's own accounts, so they work a little differently from a company account:

- You link from the console only. The user id is always you; the connect window for other people and `POST /v1/links` need a company account.
- A connection cap counts every real-portal login linked in the last 30 days, including deleted ones. Relinking the same portal never counts again, and sandbox portals never count.
- Free: one read-only API key, one personal MCP link (no account-wide `/mcp`), a daily read cap per connection, one daily schedule, one console seat. Pro, a flat monthly price, raises the cap and lifts the daily read cap and schedule limits.

Anything a plan doesn't include answers `403` with [`plan_limit`](https://sidelatch.com/docs/errors) and `upgrade`, where to change plans. To use Sidelatch for your company's users, [talk to us](https://sidelatch.com/pricing#talk); what you built carries over.

| Portal | Test login | Shows |
|---|---|---|
| `demo_carrier` | `agency1` / `pw1` | The insurance model: about 50 policies, a year of commission statements, claims and loss runs, writes and PDFs. |
| `demo_mutual` | `agency1` / `pw1`, texted code `246810` | A second carrier built the other way round (cookie session, texted code on a new device, paged list, cents, US dates), mapped into the same model. Later sign-ins skip the code: the device is remembered. |
| `demo` | `agent1` / `pw1` | A plain portal with listings. |
| `demo` | `agent3` / `pw3`, code `123456` | A verification-code sign-in. |
| `demo` | `agent4` / `pw4`, then code `654321` | Pick text or email, then enter the code. |
| `demo` | `agent5` / `pw5` | A phone push (the sandbox approves it after 5 seconds). |
| `demo` | `agent6` / `pw6`, answers `rex` and `chicago` | Security questions. |
| `demo` | `agent7` / `pw7`, authenticator setup key `JBSWY3DPEHPK3PXP` | Authenticator code; give the setup key and later sign-ins answer it themselves. |

The same agency, `agency1`, has business at both carriers: run `list_policies` on a `demo_carrier` and a `demo_mutual` connection and the answers have the same fields, whatever each carrier's site sends. Riverside Plumbing LLC has policies at both.

### Break a sandbox connection

See what your app gets when a portal fails, before a real one does. On a `demo_carrier` or `demo_mutual` connection, **Connections → Open → Try a failure** in the console, or [`PUT /v1/connections/{id}/sandbox-fault`](https://sidelatch.com/docs/api#ref-put-v1-connections-conn-id-sandbox-fault), and run a read. Only that connection is affected.

| `kind` | The portal | What you get |
|---|---|---|
| `session_expired` | Forgets the session, once. | The read succeeds: we sign in again on our own. The run's steps show it. |
| `password_changed` | Stops accepting the stored login. | `reconnect_needed` (reason `wrong_password`) and the `connection.reconnect_needed` webhook. Linking again clears it. |
| `code_required` | Texts a code on the next sign-in (`demo_mutual`). | `reconnect_needed` (reason `challenge_required`): we never answer a texted code for the user. |
| `portal_down` | Down for two minutes. | `portal_down` after one retry. The connection stays connected. |
| `site_changed` | Renames fields in its answers. | `schema_drift`: ours to fix. The connection stays connected and the user does nothing. |

---

Sidelatch docs: [Docs](https://sidelatch.com/docs.md) · [Quick start](https://sidelatch.com/docs/quickstart.md) · [Concepts](https://sidelatch.com/docs/concepts.md) · [The connect window](https://sidelatch.com/docs/guides/connect-window.md) · [Webhooks](https://sidelatch.com/docs/guides/webhooks.md) · [MCP for AI agents](https://sidelatch.com/docs/guides/mcp.md) · [Writes](https://sidelatch.com/docs/guides/writes.md) · [Build a portal](https://sidelatch.com/docs/guides/build-a-portal.md) · [Events](https://sidelatch.com/docs/events.md) · [Errors](https://sidelatch.com/docs/errors.md) · [API reference](https://sidelatch.com/docs/api.md)
