# Connect

Connect an Attentive company to a profile with a custom app's API key, from the dashboard or with the API.

Attentive has no sign-in flow for this. You create a custom app in Attentive and send its API key to Zernio, which checks it before saving the account.

## Connect with the API key

Send the key for a profile:

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

```json
{ "accountId": "6507a1b2c3d4e5f6a7b8c9d0", "companyId": "12345", "accountName": "Example Store" }
```

| Field | Where to find it |
|-------|------------------|
| `apiKey` | The API key of a custom app you create under **Integrations** in Attentive, with write access to **Custom Events** and **eCommerce**. Required. |
| `name` | A display name for the account, up to 100 characters. Optional: Zernio uses the company name from Attentive. |

In the dashboard, open **Connections**, pick **Attentive** and paste the same key.

## How it behaves

- Zernio reads the key's Attentive company once to check it. Nothing is saved unless Attentive accepts the key.
- The company id becomes the connection's only destination. List it with `GET /v1/ads/conversions/destinations`.
- A profile holds one Attentive company. Connecting the same company again replaces its key.
- 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` | Attentive refused the key | Copy the key again from the custom app under Integrations. |
| `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 Attentive company | Disconnect it first, or use another profile. |
| `502` with `platform_api_error` | Attentive could not confirm the key right now; nothing was saved | Retry in a minute. |

## Related

- [Connect an Attentive account](/connect/connect-attentive-credentials)
- [List conversion destinations](/conversions/list-ad-conversion-destinations)
- [Conversions](/platforms/attentive/conversions)