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

# Quickstart

> Create a key, verify identity, and list campaigns.

## 1. Create a Developer API key

Open FirstSales settings and go to **API**. Create a key with the minimum scopes needed for your workflow.

For a read-only campaign check, use:

```text theme={null}
campaigns:read
organizations:read
workspaces:read
```

Store the raw key immediately. FirstSales shows it only once.

## 2. Export the key

```bash theme={null}
export FIRSTSALES_API_KEY="fs_..."
export FIRSTSALES_BASE_URL="https://api.app.firstsales.io"
```

## 3. Verify the active identity

```bash theme={null}
firstsales whoami --json
```

Or use cURL:

```bash theme={null}
curl "$FIRSTSALES_BASE_URL/api/v1/whoami" \
  -H "Authorization: Bearer $FIRSTSALES_API_KEY"
```

## 4. List workspaces

```bash theme={null}
firstsales workspaces list --org org_123 --json
```

## 5. List campaigns

```bash theme={null}
firstsales campaigns list --org org_123 --workspace ws_123 --json
```

## 6. Mutate safely

For retries, provide an idempotency key:

```bash theme={null}
firstsales contacts create \
  --org org_123 \
  --workspace ws_123 \
  --data '{"email":"alex@example.com","firstName":"Alex"}' \
  --idempotency-key import-row-001 \
  --json
```
