# Quickstart

This walks through the three calls every integration starts with. You need a secret key (`rikor_sk_…`); if you
don't have one yet, ask your Rikor contact or write to [support@rikor.io](mailto\:support@rikor.io).

:::warning
A secret key belongs on a server. Never put it in a browser, a mobile app or a repository\: a secret key sent from a
browser is refused, and the key's owners are notified.
:::

::::steps
### Store the key

Keep the key in your secret manager and expose it to your service as an environment variable.

```bash
export RIKOR_KEY="rikor_sk_…"
```

### Ask who you are

`GET /v1/me` tells you which account the key belongs to, the brands it reaches right now, its scopes and its rate
limit. It is the cheapest way to check a key works.

:::code-group
```bash [curl]
curl https://api.rikor.io/v1/me \
  -H "Authorization: Bearer $RIKOR_KEY"
```

```ts [Node.js]
const res = await fetch("https://api.rikor.io/v1/me", {
  headers: { Authorization: `Bearer ${process.env.RIKOR_KEY}` },
});
const me = await res.json();
```

```python [Python]
import os, requests

me = requests.get(
    "https://api.rikor.io/v1/me",
    headers={"Authorization": f"Bearer {os.environ['RIKOR_KEY']}"},
).json()
```
:::

```json
{
  "object": "me",
  "scope_type": "franchisor",
  "scope_id": "65f0c2a1e4b0a1b2c3d4e5f6",
  "name": "Northside Fitness",
  "franchisor_ids": ["65f0c2a1e4b0a1b2c3d4e5f6"],
  "scopes": ["compliance:read", "franchisees:map"],
  "key": { "id": "6720f1…", "kind": "secret", "last4": "Q7xk", "label": "CRM sync" },
  "rate_limit": { "per_minute": 120, "in_flight": 4 },
  "as_of": "2026-10-29T17:02:11.000Z"
}
```

### List your franchisees

Page through every location in scope. Add `include=coverages` to get each row's ledger inline (pages are then
capped at 25).

```bash
curl "https://api.rikor.io/v1/franchisees?limit=50" \
  -H "Authorization: Bearer $RIKOR_KEY"
```

```json
{
  "object": "list",
  "data": [
    {
      "object": "franchisee",
      "id": "66a1d0c9e4b0a1b2c3d4c0f3",
      "external_id": null,
      "franchisor_id": "65f0c2a1e4b0a1b2c3d4e5f6",
      "entity_name": "Northside Studio LLC",
      "dba": "Northside Studio",
      "center_name": null,
      "city": "Austin",
      "state": "TX",
      "postal_code": "78757",
      "compliance_status": "non_compliant",
      "compliance_score": 82,
      "policy_status": "expiring",
      "next_expiration_date": "2026-11-09",
      "updated_at": "2026-10-29T04:00:12.000Z",
      "as_of": "2026-10-29T17:02:11.000Z"
    }
  ],
  "has_more": true,
  "next_cursor": "eyJpZCI6IjY2YTFk…",
  "as_of": "2026-10-29T17:02:11.000Z"
}
```

Pass `next_cursor` back as `cursor` until `has_more` is `false`.

### Open one franchisee

The detail adds `coverages`, the per-coverage ledger.

```bash
curl https://api.rikor.io/v1/franchisees/66a1d0c9e4b0a1b2c3d4c0f3 \
  -H "Authorization: Bearer $RIKOR_KEY"
```
::::

## Next

* Keep your copy current with [Sync compliance data](/guides/sync).
* Store your own location ids with [Map your own ids](/guides/external-ids).
* Learn what each status means in [Compliance and the ledger](/concepts/compliance).
