# Connect

Connect an Awin advertiser to a profile with its advertiser id and an API key, from the dashboard or with the API.

Awin has no sign-in flow for this. You copy your advertiser id and an API key from Awin and send them to Zernio, which checks them before saving the account.

## Connect with the advertiser id and API key

Send both for a profile:

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

```json
{ "accountId": "6507a1b2c3d4e5f6a7b8c9d0", "advertiserId": "123456", "accountName": "Awin advertiser 123456" }
```

| Field | Where to find it |
|-------|------------------|
| `advertiserId` | Your numeric advertiser id, on **Settings**, **User settings**, **API credentials** in Awin. Required. |
| `apiKey` | An API key from the same page. Required. |
| `name` | A display name for the account, up to 100 characters. Optional. |

In the dashboard, open **Connections**, pick **Awin** and paste the same values.

## How it behaves

- Awin has no endpoint to read a key, so Zernio sends one test order that Awin never tracks. Nothing is saved unless Awin accepts the key for that advertiser.
- The advertiser id becomes the connection's only destination. List it with `GET /v1/ads/conversions/destinations`.
- A profile holds one Awin advertiser. Connecting the same advertiser 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 |
|-------|-------|-----|
| `400` on `advertiserId` | The id is not numeric | Copy the advertiser id from API credentials. |
| `401` with `invalid_credentials` | Awin refused the key for this advertiser id | Copy both again from API credentials. |
| `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 Awin advertiser | Disconnect it first, or use another profile. |
| `502` with `platform_api_error` | Awin could not confirm the key right now; nothing was saved | Retry in a minute. |

## Related

- [Connect an Awin advertiser](/connect/connect-awin-credentials)
- [List conversion destinations](/conversions/list-ad-conversion-destinations)
- [Conversions](/platforms/awin/conversions)