# Quickstart

Make a sandbox key, make a first call and read the answer. Nothing here moves real money: a sandbox key reaches only sandbox data and test money.

## 1. Make a sandbox key

Keys are made on the platform, `https://platform.skerry.xyz`. You are there with your Praecise account; Skerry has no sign-in of its own.

1. Open the platform. Its front page lists your projects. A project holds its own keys, endpoints and customers.
2. Open a project. Under **API keys**, choose **Sandbox**, choose the scopes the key should hold, and press **Create key**.
3. Copy the secret when it is shown. Skerry keeps only a hash of it, so it cannot be shown again; a lost key is rolled or replaced.

A sandbox key starts with `sk_test_` and a live key with `sk_live_`. The environment is in the key, not in a header, so the same code runs against both by swapping one value. Sandbox needs no verification and no approval.

## 2. Make a first call

`GET /whoami` answers with what the API knows about the key you sent. Any key may call it.

```sh
curl https://api.skerry.xyz/whoami \
  -H "Authorization: Bearer sk_test_..."
```

## 3. Read the answer

```json
{
  "partner": { "id": "…", "name": "…" },
  "mode": "sandbox",
  "scopes": ["customers:read", "payments:read"],
  "key_id": "…",
  "auth_method": "api_key",
  "agent": null
}
```

- `mode` is `sandbox` for a `sk_test_` key.
- `scopes` are the ones you chose. An operation names the scope it needs; a key without it is refused with 403.
- `agent` is null unless the key belongs to a registered agent or the request names one.

Every response carries `x-request-id`; keep it on anything you log. Every response to a key also carries `RateLimit-Limit` and `RateLimit-Remaining`.

A failure has one shape. Branch on `code`, never on `message`:

```json
{ "error": { "code": "unauthenticated", "message": "…", "detail": null, "request_id": "…" } }
```

## 4. What to read next

- `GET /` lists every operation without a key, and `GET /openapi.json` is the same reference as an OpenAPI 3.1 document.
- `GET /capabilities` says what the platform offers and what is switched on for your account.
- Send `Idempotency-Key` on every POST: a repeat returns the first answer instead of acting twice, with `Idempotent-Replayed: true` on it.
- [Payments](payments.md) for taking money, [Payouts](payouts.md) for sending it, [Events and webhooks](events.md) for hearing what happened, and [Agents](agents.md) with [Mandates](mandates.md) and [Approvals](approvals.md) for letting an agent act within limits a person set.
