> ## Documentation Index
> Fetch the complete documentation index at: https://docs.yousonder.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Get an API key and make your first call.

<Steps>
  <Step title="Get an API key">
    The author creates it in Sonder under **Settings → [API keys](https://app.yousonder.com/settings?tab=api)**: they name it (for example "Publisher Champ"), copy it and paste it into your product. Keys start with `sonder_live_` and are shown once.

    If you're building for many authors, [one-click connect](/guides/one-click-connect) lets them skip the copy and paste.
  </Step>

  <Step title="Check the key works">
    Call `GET /account`. It tells you whose account the key belongs to, so you can show "Connected as Jane Author".

    <CodeGroup>
      ```bash cURL theme={null}
      curl https://api.yousonder.com/v1/account \
        -H "Authorization: Bearer sonder_live_YOUR_KEY"
      ```

      ```javascript JavaScript theme={null}
      const res = await fetch("https://api.yousonder.com/v1/account", {
        headers: { Authorization: `Bearer ${process.env.SONDER_API_KEY}` },
      });
      const { data } = await res.json();
      console.log(`Connected as ${data.name}`);
      ```

      ```python Python theme={null}
      import os, requests

      res = requests.get(
          "https://api.yousonder.com/v1/account",
          headers={"Authorization": f"Bearer {os.environ['SONDER_API_KEY']}"},
      )
      print("Connected as", res.json()["data"]["name"])
      ```
    </CodeGroup>
  </Step>

  <Step title="Read the last week of views">
    `GET /stats` returns views gained each day for every video that moved in the range. The default range is the last 7 days (UTC).

    ```bash theme={null}
    curl "https://api.yousonder.com/v1/stats?start_date=2026-09-10&end_date=2026-09-16" \
      -H "Authorization: Bearer sonder_live_YOUR_KEY"
    ```

    ```json theme={null}
    {
      "success": true,
      "start_date": "2026-09-10",
      "end_date": "2026-09-16",
      "breakdown": "daily",
      "timezone": "UTC",
      "group_by": "video",
      "data": [
        {
          "video": {
            "id": "9f3c2a71-4b6e-4d8a-a1c5-7e2b9d0f3a64",
            "title": "Your kid isn't lazy. They're exhausted.",
            "book": { "id": "5b1d7c2e-8f0a-4c1b-9d3e-2a6f4b8c9e01", "title": "The Quiet Hours" },
            "posted_at": "2026-09-14T17:02:11.000Z"
          },
          "days": [
            { "date": "2026-09-14", "views": 2210, "views_total": 2210, "is_viral": false, "went_viral": false },
            { "date": "2026-09-15", "views": 31480, "views_total": 33690, "is_viral": true, "went_viral": true },
            { "date": "2026-09-16", "views": 14523, "views_total": 48213, "is_viral": true, "went_viral": false }
          ]
        }
      ]
    }
    ```

    `went_viral: true` marks the day to highlight on a chart.
  </Step>
</Steps>

## Next

<CardGroup cols={2}>
  <Card title="Poll for viral days" icon="arrows-rotate" href="/guides/polling">
    The loop Publisher Champ runs: events for notifications, stats for charts.
  </Card>

  <Card title="API reference" icon="code" href="/api-reference/introduction">
    Every endpoint, field and error, with a live playground.
  </Card>
</CardGroup>
