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

# Quickstart

> From API key to your first authenticated request

## Prerequisites

* Active **cloakup** subscription with API keys enabled on your plan
* An API key with at least `campaigns:list` (or the scopes you need)

Create keys in the dashboard: [app.cloakup.me → Settings → API Keys](https://app.cloakup.me/settings/api-keys).

## Authenticate

Every `/v1` request requires:

```http theme={null}
Authorization: Bearer ck_<your-secret>
Content-Type: application/json
```

Keys start with `ck_` followed by 64 hex characters.

## First request

<Steps>
  <Step title="List campaigns">
    ```bash theme={null}
    curl -sS \
      -H "Authorization: Bearer ck_YOUR_KEY" \
      "https://api.cloakup.me/v1/campaigns?page=1&limit=10"
    ```
  </Step>

  <Step title="Check the response">
    A `200` response includes `count` and `data` (array of campaigns). See [Errors](/errors) if you get `401`, `403`, or `429`.
  </Step>

  <Step title="Create a domain (if needed)">
    ```bash theme={null}
    curl -sS -X POST \
      -H "Authorization: Bearer ck_YOUR_KEY" \
      -H "Content-Type: application/json" \
      -d '{"name":"track.example.com"}' \
      "https://api.cloakup.me/v1/domains"
    ```
  </Step>

  <Step title="Verify the domain">
    ```bash theme={null}
    curl -sS -X PATCH \
      -H "Authorization: Bearer ck_YOUR_KEY" \
      "https://api.cloakup.me/v1/domains/DOMAIN_ID/verify"
    ```

    Repeat until `verified: true`.
  </Step>

  <Step title="Create a campaign">
    Use the [minimal production-safe body](/guides/campaign-create#minimal-example). Do **not** set `filters.deny_always: true` unless you are testing.
  </Step>
</Steps>

## Anti-patterns

<Warning>
  Avoid these common mistakes — they cause `422` errors or broken production traffic.
</Warning>

* Do **not** set `filters.deny_always: true` unless you explicitly want review/test mode
* Do **not** copy the full `filters` object from a GET response into POST/PUT
* Do **not** invent country codes or browser languages — follow [Campaign filters](/guides/campaign-filters)
* Do **not** send `filters.query.params` values as a plain string — always `string[]` (e.g. `"utm_source": ["google"]`)
* Do **not** put `http(s)://`, `www`, or `/` in domain `name`
* Do **not** treat PUT as partial PATCH — send a **full** campaign body
* Do **not** use `https://api.example.com` — use `https://api.cloakup.me`

## Environment variables

| Variable          | Description                                                     |
| ----------------- | --------------------------------------------------------------- |
| `CLOAKUP_API_URL` | Base URL without trailing slash (e.g. `https://api.cloakup.me`) |
| `CLOAKUP_API_KEY` | Full key `ck_...`                                               |

## Next steps

<CardGroup cols={2}>
  <Card title="Scopes" icon="shield" href="/authentication#scopes">
    Which permission each endpoint needs.
  </Card>

  <Card title="Campaign create" icon="pen" href="/guides/campaign-create">
    Defaults, business rules, and minimal example.
  </Card>

  <Card title="MCP integration" icon="robot" href="/reference/mcp">
    Use Cloakup from Cursor or other MCP clients.
  </Card>

  <Card title="Help center" icon="circle-question" href="https://help.cloakup.me/pt-br/article/chaves-de-api-jrrc7a/">
    Dashboard guide for creating and managing keys.
  </Card>
</CardGroup>
