The reference is auto-generated from the live OpenAPI 3.1 spec at
[`app.refcampaign.com/api/openapi.json`](https://app.refcampaign.com/api/openapi.json)
— there is no manual YAML to drift out of sync with code.

Endpoints are grouped by tag in the sidebar:

* **Conversions** — track conversions, list, export to CSV/XLSX.
* **Campaigns** — create, read, update, archive campaigns and inspect their stats.
* **Affiliates** — list affiliates, fetch detail, manage assignment.
* **Commissions** — list, bulk-approve, bulk-reject.
* **Payouts** — list and create payouts.
* **Applications** — accept or reject affiliate applications, individually or in bulk.
* **Tracking** — record clicks and identify visitors from the SDK.

Every operation page includes:

* The full request schema (path params, query params, JSON body) with required/optional markers.
* A response table per status code with the JSON body shape.
* Code samples in cURL, JavaScript (`fetch`), and Python (`requests`).
* A try-it-out playground that posts the request through this site's
  [forward proxy](https://docs.refcampaign.com/api/proxy) so the browser's CORS
  rules don't block the response.

## Authentication

All requests authenticate with a Bearer token. Generate one in the dashboard
under **Settings → API keys** and pass it on every request:

```http
Authorization: Bearer <YOUR_TOKEN>
```

The playground exposes an Authorization input at the top of each operation —
paste the token there to test the endpoint live against
`app.refcampaign.com`.

## Errors

Every error returns a consistent JSON shape:

```json
{
  "error": {
    "code": "VALIDATION_FAILED",
    "message": "currency must be a 3-letter ISO 4217 code",
    "details": { "field": "currency" }
  }
}
```

See [error handling](/docs/api/error-handling) for the full code reference.
