> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.campino.tech/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.campino.tech/_mcp/server.

# Authentication

> One partner credential per integration, sent as a bearer token.

Every request carries your partner credential as a bearer token.

```http
Authorization: Bearer pc_live_<selector>.<secret>
```

**`cURL`**

```bash cURL
curl https://campino.tech/api/v1/partner/audience/searches/$REQUEST_ID \
  -H "Authorization: Bearer $CAMPINO_PARTNER_KEY"
```

**`Python`**

```python Python
import requests

requests.get(
    f"https://campino.tech/api/v1/partner/audience/searches/{request_id}",
    headers={"Authorization": f"Bearer {API_KEY}"},
    timeout=30,
)
```

**`Node.js`**

```javascript Node.js
await fetch(`https://campino.tech/api/v1/partner/audience/searches/${requestId}`, {
  headers: { Authorization: `Bearer ${API_KEY}` },
});
```

## Getting a credential

We issue the credential for you. [Contact us](mailto:info@campino.tech) with the name of your
integration. It is shown once, when we hand it over, and we store only a hash of it.

> **Warning**
>
> A lost credential is replaced, not recovered. Put it in your secret manager as soon as you receive it,
> and never ship it in client-side code.

|                    |                                                                                                      |
| ------------------ | ---------------------------------------------------------------------------------------------------- |
| Format             | `pc_live_` followed by a selector, a dot and a secret                                                |
| Lifetime           | One year by default                                                                                  |
| Rotation           | Ask us for a new one. The old credential keeps working for 24 hours, so you can deploy without a gap |
| Revocation         | Ask us. A revoked credential stops working at once                                                   |
| Address allow-list | Optional. If we set one, requests from other addresses answer `401`                                  |

## What the credential spends

The credential acts on your Campino account and its wallet. Searches and purchases are charged to
that wallet. Top up the wallet before you submit: a search that the balance does not cover answers `400`
and nothing is charged.

## When authentication fails

Every credential problem answers the same way, so a response never tells an attacker which part was
wrong.

```json
{
  "status": "failure",
  "data": null,
  "error": { "code": 4012, "message": "Invalid partner credential", "fields": null }
}
```

The status is `401` and the response carries `WWW-Authenticate: Bearer`. It means the credential is
missing, malformed, unknown, revoked or expired, the request came from an address outside the
allow-list, or the `Authorization` header was sent twice.