# Quickstart: REST API

**You need:** an API key in `EC_API_KEY` and any HTTP client.

1. **Get a key.** Sign up at https://app.tendbrook.com/sign-up (the Free plan, no card). An owner creates a key in Settings → API keys and picks its scopes: `agents:read` to read, plus `agents:write` to make changes. Keep it in an environment variable, never in a file you commit:

   ```bash
   export EC_API_KEY=ec_live_…
   ```
2. **Call it** (no key yet? `ec sandbox create --host https://api.tendbrook.com` makes a sandbox and saves its key):

   ```bash
   curl -s https://api.tendbrook.com/v1/me -H "Authorization: Bearer $EC_API_KEY"
   curl -s "https://api.tendbrook.com/v1/agents?limit=10" -H "Authorization: Bearer $EC_API_KEY"
   curl -s "https://api.tendbrook.com/v1/approvals?status=pending" -H "Authorization: Bearer $EC_API_KEY"
   ```
3. **Check it.** `/v1/me` answers with your organization and scopes. The spec for every route is at
   [https://www.tendbrook.com/openapi.json](https://www.tendbrook.com/openapi.json), and [the reference](https://www.tendbrook.com/docs/api) lists them by resource.

Errors are `{ "error": { "code", "message", "details" } }`; see [limits and errors](https://www.tendbrook.com/for-agents#limits-and-errors).
