---
title: Quickstart
description: Issue a key and make your first request.
sidebar:
  order: 1
---

## 1. Issue a key

Sign in, open [your account's API page](https://hockay.com/account/developers), name a key, and issue it. The key starts with `hck_`. It is shown once: copy it somewhere safe. You can hold three at a time and revoke any of them from the same page.

## 2. Ask for the standings

Send the key in the `x-api-key` header:

```bash
curl -H "x-api-key: hck_…" https://hockay.com/api/v1/standings
```

Every answer is JSON. What you asked for is under `data`:

```json
{
  "data": [
    {
      "teamId": "mtl",
      "wins": 12,
      "losses": 4,
      "overtimeLosses": 1,
      "points": 25,
      "rank": 1,
      "conferenceRank": 1
    }
  ]
}
```

Teams are ids. Fetch `/teams` once and keep it: it changes when the league does, not when a game ends.

## 3. Follow a game

List tonight's live games, then read a game's events as they air:

```bash
curl -H "x-api-key: hck_…" "https://hockay.com/api/v1/games?status=live"
curl -H "x-api-key: hck_…" https://hockay.com/api/v1/games/S04D05-MTL-ANC/events
```

To poll, pass the last event you have as `after`, and only what aired since comes back:

```bash
curl -H "x-api-key: hck_…" \
  "https://hockay.com/api/v1/games/S04D05-MTL-ANC/events?after=evt_…"
```

Once the game is final, `/boxscore` and `/commentary` open.

## Next

- [Responses](/docs/responses): pages, caching, and ids.
- [Limits](/docs/limits): how many requests a minute.
- The [API reference](/docs/reference) lists every endpoint and field, and can run requests with your key.
