# Quickstart

> Link a LinkedIn account and make your first real API call in a few minutes.

This guide takes you from zero to a working search in four steps.

## 1. Get an API key

Sign in to the [dashboard](https://app.correctinbox.com), open **Settings → API keys**, and create a key. Copy it once and keep it on your server — treat it like a password.

```bash
export CORRECTINBOX_API_KEY="sk_live_xxxxxxxxxxxxxxxx"
```

## 2. Link a LinkedIn account

Create a hosted connection link and send your user to it. When they finish, the account appears in your workspace as `connected`.

```bash
curl -X POST https://api.correctinbox.com/v1/accounts/link \
  -H "X-API-KEY: $CORRECTINBOX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "provider": "LINKEDIN", "success_redirect_url": "https://yourapp.com/connected" }'
```

```js
const res = await fetch("https://api.correctinbox.com/v1/accounts/link", {
  method: "POST",
  headers: {
    "X-API-KEY": process.env.CORRECTINBOX_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    provider: "LINKEDIN",
    success_redirect_url: "https://yourapp.com/connected",
  }),
});
const { url } = await res.json();
// redirect your user to `url`
```

```python
import os, requests

res = requests.post(
    "https://api.correctinbox.com/v1/accounts/link",
    headers={"X-API-KEY": os.environ["CORRECTINBOX_API_KEY"]},
    json={"provider": "LINKEDIN", "success_redirect_url": "https://yourapp.com/connected"},
)
print(res.json()["url"])
```

The response contains a `url`. Open it in a browser; the account is linked when the flow completes. See [Link an account](/link-account) for every option.

## 3. Find the account id

```bash
curl https://api.correctinbox.com/v1/accounts \
  -H "X-API-KEY: $CORRECTINBOX_API_KEY"
```

Grab the `id` (for example `acc_8f21c0`) of a `connected` account.

## 4. Run your first search

```bash
curl -X POST https://api.correctinbox.com/v1/search \
  -H "X-API-KEY: $CORRECTINBOX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "account_id": "acc_8f21c0", "type": "people", "keywords": "founder fintech", "pages": 1 }'
```

```js
const res = await fetch("https://api.correctinbox.com/v1/search", {
  method: "POST",
  headers: {
    "X-API-KEY": process.env.CORRECTINBOX_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    account_id: "acc_8f21c0",
    type: "people",
    keywords: "founder fintech",
    pages: 1,
  }),
});
console.log(await res.json());
```

```python
import os, requests

res = requests.post(
    "https://api.correctinbox.com/v1/search",
    headers={"X-API-KEY": os.environ["CORRECTINBOX_API_KEY"]},
    json={"account_id": "acc_8f21c0", "type": "people", "keywords": "founder fintech", "pages": 1},
)
print(res.json())
```

That's it. From here, build a [campaign](/campaigns) to reach the people you found, or open the [unified inbox](/messaging) to handle replies.
