Affiliate Network API Documentation
Authentication
To get started, please obtain your unique API key by logging into your account and navigating to the Account Details page > API key section. This page allows you to also refresh/revoke the generated keys to maintain the high level of security for your applications.
The provided key serves as your access token and must be included in the X-API-KEY header of each API request.
curl -X GET "https://api.sourceknowledge.com/affiliate/v2/advertisers" -H "accept: application/json" -H "X-API-KEY: [Your API key]"429 Too many requests/Rate Limits: API servers expect no more than 200 requests/minute & same request retry is limited to 10 times/minute. Any call beyond these rate limits will result in HTTP 429 error
503 Service Unavailable – Returned during maintenance or high load. Retry later to process the request.
Transport Layer Security (TLS) Protocol Required Version: 1.3
Affiliates can access: https://api.sourceknowledge.com/doc/affiliate to view an interactive documentation, which shows and describes all our available endpoints and parameters, and gives Affiliates the ability to test the endpoints directly on the page. Be aware that when interacting with create/edit API as it could update your campaign settings.
Endpoints
Advertisers
Returns advertiser categories. If you do not have access to this end point, please contact your account manager.
Endpoint
/affiliate/v2/categories
e.g. /affiliate/v2/categories
Status Codes
Code | Description |
|---|
Code | Description |
|---|---|
200 | Returned when successful |
401 | Returned when not authorized |
403 | Returned when access is forbidden |
Sample response data
Response Body:
[
{
"id": 0,
"name": "string"
}
]Returns Advertisers
Endpoint
/affiliate/v2/advertisers
e.g. /affiliate/v2/advertisers
Filters
Name | Description |
|---|
Name | Description |
|---|---|
page | Optional. Defaults to 1 Results page number. Example: page=2 When the response contains “hasMore”: true, it means that more results are available. If you called the endpoint with page=1, then you need to call it again with page=2 to get more. |
Status Codes
Code | Description |
|---|
Code | Description |
|---|---|
200 | Returned when successful |
401 | Returned when not authorized |
403 | Returned when access is forbidden |
Sample response data
Response Body:
{
"itemsCount": 0,
"items": [
{
"id": 0,
"name": "string",
"businessUrl": "string",
"categoryId": 0,
"categoryName": "string"
}
],
"hasMore": true,
"page": 0
}Endpoint
/affiliate/v2/advertisers
e.g. /affiliate/v2/advertisers
Filters
Name | Description |
|---|
Name | Description |
|---|---|
body | Required Advertiser settings Example: {
"name": "string",
"businessUrl": "string",
"categoryId": 0
} |
| To get list categories with ids see /affiliate/v2/categories |
Status Codes
Code | Description |
|---|
Code | Description |
|---|---|
200 | Returned when successful |
400 | When an invalid request or payload is sent to the server |
401 | Returned when not authorized |
403 | Returned when access is forbidden |
Sample response data
Response Body:
{
"id": 0,
"name": "string",
"businessUrl": "string",
"categoryId": 0,
"categoryName": "string"
}Returns detailed information about the advertiser
Endpoint
/affiliate/v2/advertisers/{id}
e.g. /affiliate/v2/advertisers/10
Filters
Name | Description |
|---|
Name | Description |
|---|---|
id | Required Advertiser Id Example: id=10 |
Status Codes
Code | Description |
|---|
Code | Description |
|---|---|
200 | Returned when successful |
400 | When an invalid request or payload is sent to the server |
401 | Returned when not authorized |
403 | Returned when access is forbidden |
Sample response data
Response Body:
{
"id": 0,
"name": "string",
"businessUrl": "string",
"categoryId": 0,
"categoryName": "string"
}Endpoint
/affiliate/v2/advertisers/{id}
e.g. /affiliate/v2/advertisers/10
Filters
Name | Description |
|---|
Name | Description |
|---|---|
id | Required Advertiser Id Example: id=10 |
body | Required Advertiser settings Example: {
"name": "string",
"businessUrl": "string",
"categoryId": 0
} |
| To list categories, see /affiliate/v2/categories |
Status Codes
Code | Description |
|---|
Code | Description |
|---|---|
200 | Returned when successful |
400 | When an invalid request or payload is sent to the server |
401 | Returned when not authorized |
403 | Returned when access is forbidden |
Sample response data
Response Body:
{
"id": 0,
"name": "string",
"businessUrl": "string",
"categoryId": 0,
"categoryName": "string"
}
Campaigns
Returns advertiser's campaigns. If you do not have access to this end point, please contact your account manager.
Endpoint
/affiliate/v2/campaigns
e.g. /affiliate/v2/campaigns
Filters
Name | Description |
|---|
Name | Description |
|---|---|
page | Optional. Defaults to 1 Results page number. Example: page=2 When the response contains “hasMore”: true, it means that more results are available. If you called the endpoint with page=1, then you need to call it again with page=2 to get more. |
advertiserId | Optional Advertiser id to filter the results Example: advertiserId=10 |
Status Codes
Code | Description |
|---|
Code | Description |
|---|---|
200 | Returned when successful |
400 | Returned when advertiserId id is not a numeric value |
401 | Returned when not authorized |
403 | Returned when access is forbidden |
404 | Returned when the advertiser was not found |
Sample response data
Response Body:
{
"itemsCount": 0,
"items": [
{
"id": 0,
"name": "string",
"active": true,
"status": 0,
"start": "string",
"end": "string",
"updated": "string",
"advertiser": {
"id": 0,
"name": "string"
}
}
],
"hasMore": true,
"page": 0
}Value | Meaning | Description |
|---|
Value | Meaning | Description |
|---|---|---|
status | Campaign Status | The status of the campaign. |
name* | Campaign Name | Name of the Campaign |
start* | Campaign Start Date | Date and time of the Start of the Campaign |
end | Campaign End Date | Date and time of the End of the Campaign. |
updated | Campaign Update date | Date and time the campaign was last updated. |
Status
Value | Description |
|---|
Value | Description |
|---|---|
1 | Live |
0 | Paused |
Endpoint
/api/agency/v2/campaigns
e.g. /api/agency/v2/campaigns
Filters
Name | Description |
|---|
Name | Description |
|---|---|
body | Required Campaign settings Example: {
"name": "Sample Campaign",
"start": "2025-12-27T05:00:00+00:00",
"end": null,
"dailyBudget": 10000,
"cpc": 0.2,
"trackingUrl": "https://sampletracking.com/params",
"allowDeepLink": false,
"geoTargeting": [
"US"
],
"geoRegionTargeting": [],
"geoCityTargeting": [],
"deviceTargeting": ["Mobile","Desktop"],
"platformTargeting": [],
"browserTargeting": [],
"partnerChannels": [ "1","2","3","4","5","6","8","9","10"],
"strategyId": 3,
"advertiserId": 115351
} |
Value | Type | Description |
|---|
Value | Type | Description |
|---|---|---|
name* | string | The name of the campaign. |
start* | string | The campaign's start date in |
end | string | The campaign's end date in |
dailyBudget* | float | The maximum amount to be spent per day. Example: |
cpc* | float | The Cost Per Click (CPC) bid for this campaign. Example: |
trackingUrl* | string | The primary URL used to track a click and redirect the user. This URL should be pre-populated with any required parameters and supported macros for dynamic data insertion. |
allowDeepLink | boolean | Set to |
geoTargeting* | array[string] | An array of two-letter ISO country codes to target. Example: Please call the "geoTargeting": ["US"] |
geoRegionTargeting | array[string] | List of region/state codes within the selected countries. Each region code must match the supported regions for the provided country codes. Please call the "geoRegionTargeting": ["MA", "CA"] |
geoCityTargeting | array[object] | List of city names, paired with the region code they belong to. Both the city name and its region must be valid values supported by the API. Please call the "geoCityTargeting": [
{
"name": "Boston",
"region": "MA"
}
] |
deviceTargeting | array[string] | An array of device types to target. If omitted, all devices will be targeted. |
platformTargeting | array[string] | An array of operating systems to target. If omitted, all platforms will be targeted. |
browserTargeting | array[string] | An array of browsers to target. If omitted, all browsers will be targeted. |
partnerChannels | array[integer] | An array of partner channel IDs to target. You can retrieve available channels from the |
strategyId* | integer | The targeting strategy for the campaign. Note: Currently, only one value of 3 (Domain Targeting) is accepted. |
advertiserId* | integer | The unique identifier for the advertiser associated with this campaign. You can retrieve advertiser IDs from the |
Supported Platform Targeting
Value | Description |
|---|
Value | Description |
|---|---|
| Linux |
| Android |
| iPadOS |
| iOS |
| MacOS |
| Windows |
Supported Browser Targeting
Value | Description |
|---|
Value | Description |
|---|---|
ed | Edge |
fb | |
fx | Firefox |
gc | Chrome |
ie | Internet Explorer |
in | |
op | Opera |
sf | Safari |
tt | TikTok |
Status Codes
Code | Description |
|---|
Code | Description |
|---|---|
200 |