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

# Quickstart

> Create an API key in Soundlink, verify it with ping, and fetch your first campaign list.

Get your first successful API response in a few minutes with `curl`. Using Node.js or TypeScript? See [Access the API with TypeScript](/docs/typescript-sdk) instead.

## Prerequisites

* A Soundlink account with **owner** or **admin** access to your organization
* An API key (`sk_*`) — create one in the app (below) or use an existing key

<CardGroup cols={2}>
  <Card title="Create an API key" icon="key" href="/docs/authentication#create-an-api-key">
    Step-by-step in **Settings → Developer → API keys** — name, expiration, scopes, and one-time
    copy. Includes screenshots.
  </Card>

  <Card title="Open in Soundlink" icon="arrow-up-right-from-square" href="https://getsoundlink.com/home">
    Sign in, then **Settings → Developer → API keys**.
  </Card>
</CardGroup>

<Note>
  Keys need at least one scope and an expiration choice — a fixed preset (7 days to 1 year) or
  **Never**. See [Authentication](/docs/authentication#expiration) for details.
</Note>

## 1. Ping (connectivity)

Replace `sk_YOUR_PREFIX_YOUR_SECRET` with the key you copied from the **Save your API key** dialog:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -sS 'https://api.getsoundlink.com/v1/ping' \
  -H 'Authorization: Bearer sk_YOUR_PREFIX_YOUR_SECRET'
```

Expected:

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "data": { "status": "ok" },
  "meta": { "requestId": "..." }
}
```

Ping accepts any valid key regardless of scopes — useful as a smoke test right after creating a key.

## 2. List campaigns

Requires the `campaigns:read` scope on your key.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -sS 'https://api.getsoundlink.com/v1/campaigns?page=1&pageSize=10' \
  -H 'Authorization: Bearer sk_YOUR_PREFIX_YOUR_SECRET'
```

## 3. Create a campaign (optional)

With the `campaigns:write` scope you can also create a wallet-funded campaign. The `Idempotency-Key` header is required — retries with the same key never double-charge:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -sS -X POST 'https://api.getsoundlink.com/v1/campaigns' \
  -H 'Authorization: Bearer sk_YOUR_PREFIX_YOUR_SECRET' \
  -H 'Idempotency-Key: my-first-campaign-01' \
  -H 'Content-Type: application/json' \
  -d '{
    "spotifyUrl": "https://open.spotify.com/track/YOUR_TRACK_ID",
    "dailyBudget": 25,
    "durationDays": 14,
    "genre": "Pop",
    "strategyType": "maximum_growth"
  }'
```

This deducts `dailyBudget × durationDays` from your wallet balance. See [Creating campaigns](/docs/creating-campaigns) for all fields and rules, and [Managing campaigns](/docs/managing-campaigns) to adjust budget or stop it later.

## 4. Use requestId for support

If something fails, include `meta.requestId` from the error response when contacting Soundlink support. See [Errors](/docs/errors) for common codes.

## Next

* **Read pipelines:** [Syncing campaigns](/docs/syncing-campaigns) → [Understanding metrics](/docs/understanding-metrics) → [JSONL exports](/docs/jsonl-exports)
* **Write flows:** [Creating campaigns](/docs/creating-campaigns) → [Managing campaigns](/docs/managing-campaigns)
