# Connect

Connect a Whop account to a profile with an Account API key from the Whop dashboard, through the API.

Whop has no sign-in flow for this. You create an Account API key in the Whop dashboard and send it to Zernio, which reads the account id and name once with it.

## Connect with an Account API key

Send the key for a profile:

```bash
curl -X POST "https://zernio.com/api/v1/connect/whop-ads/credentials" \
  -H "Authorization: Bearer $ZERNIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "profileId": "PROFILE_ID",
    "apiKey": "WHOP_API_KEY"
  }'
```

```json
{ "accountId": "6507a1b2c3d4e5f6a7b8c9d0", "whopAccountId": "biz_Ab3dEf9hJk2mN", "accountName": "Shine Time Auto Detailing" }
```

| Field | Where to find it |
|-------|------------------|
| `apiKey` | An Account API key, under **Developer**, **API keys** in the Whop dashboard. Required. |

## How it behaves

- Zernio calls Whop's `GET /accounts/me` once to learn the account id (`biz_...`) and name, then stores the key.
- `accountId` is the Zernio account to use on the tracking-tags routes; `whopAccountId` is also the id of its one tracking tag.
- A profile holds one Whop account.
- Every call on this page is also a tool on the [Zernio MCP server](/mcp/tools).

## If it fails

| Error | Cause | Fix |
|-------|-------|-----|
| `401` with `invalid_credentials` | The key cannot read its Whop account | Create a new Account API key. |
| `402` | The account cannot connect more accounts on its plan | Upgrade the plan or remove an account. |
| `403` | The Ads add-on is off | Turn on the Ads add-on, then connect. |
| `409` with `profile_platform_conflict` | The profile already has another Whop account | Disconnect it first, or use another profile. |

## Related

- [Connect a Whop account](/connect/connect-whop-ads-credentials)
- [Conversions](/platforms/whop/conversions)