Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/campaigns | List all campaigns |
| GET | /v1/campaigns/:id | Get a campaign |
| POST | /v1/campaigns | Create a campaign |
| PATCH | /v1/campaigns/:id | Update a campaign |
| DELETE | /v1/campaigns/:id | Archive a campaign |
List Campaigns
Query Parameters
| Param | Type | Default | Description |
|---|---|---|---|
| status | string | - | Filter by status: active, paused, archived |
| limit | number | 50 | Results per page (max 100) |
| offset | number | 0 | Pagination offset |
Response
Get Campaign
Response
Create Campaign
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | ✅ | Campaign name |
| target_url | string | ✅ | Destination URL |
| type | string | ✅ | CPA (conversion-based) |
| commission_type | string | ✅ | fixed or percentage |
| commission_value | number | ✅ | Commission amount |
| visibility | string | - | public (default) or private |
| attribution_window | number | - | Days to track conversions (default: 30) |
| maturation_days | number | - | Days before commission is withdrawable (default: 7) |
Example
Response
Update Campaign
Request Body
All fields are optional. Only include what you want to update.Example
Response
Archive Campaign
Archiving a campaign stops all tracking but preserves historical data.Example
Response
💡 Tip: Archived campaigns can be reactivated by updating their status to active.