Info
Welcome to the generated API reference.
Accounts
Control your Google Ad Accounts
Get all associated Google Ads accounts
Requires authentication
Example request:
curl -X GET -G "https://api.clickfraud.app/api/accounts" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/accounts");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [
{
"id": 1,
"client_id": 1,
"google_ads_id": "123-456-7890",
"auto_tagging_enabled": true,
"current_tracking_template": null,
"cross_block_participant": true,
"added": "2018-08-03 16:38:42",
"links": {
"self": "http:\/\/api.clickfraud.app\/api\/accounts\/1"
}
},
{
"id": 2,
"client_id": 2,
"google_ads_id": "111-111-1111",
"auto_tagging_enabled": null,
"current_tracking_template": null,
"cross_block_participant": true,
"added": "2019-04-18 13:39:53",
"links": {
"self": "http:\/\/api.clickfraud.app\/api\/accounts\/2"
}
},
{
"id": 3,
"client_id": 1,
"google_ads_id": "111-111-1112",
"auto_tagging_enabled": null,
"current_tracking_template": null,
"cross_block_participant": true,
"added": "2019-04-18 13:43:22",
"links": {
"self": "http:\/\/api.clickfraud.app\/api\/accounts\/3"
}
},
{
"id": 4,
"client_id": 1,
"google_ads_id": "111-111-1113",
"auto_tagging_enabled": null,
"current_tracking_template": null,
"cross_block_participant": true,
"added": "2019-04-18 13:43:32",
"links": {
"self": "http:\/\/api.clickfraud.app\/api\/accounts\/4"
}
},
{
"id": 5,
"client_id": 1,
"google_ads_id": "111-111-1114",
"auto_tagging_enabled": null,
"current_tracking_template": null,
"cross_block_participant": true,
"added": "2019-04-18 13:44:04",
"links": {
"self": "http:\/\/api.clickfraud.app\/api\/accounts\/5"
}
},
{
"id": 6,
"client_id": 1,
"google_ads_id": "111-111-1115",
"auto_tagging_enabled": null,
"current_tracking_template": null,
"cross_block_participant": true,
"added": "2019-04-18 13:44:38",
"links": {
"self": "http:\/\/api.clickfraud.app\/api\/accounts\/6"
}
},
{
"id": 7,
"client_id": 1,
"google_ads_id": "111-111-1116",
"auto_tagging_enabled": null,
"current_tracking_template": null,
"cross_block_participant": true,
"added": "2019-04-18 13:46:17",
"links": {
"self": "http:\/\/api.clickfraud.app\/api\/accounts\/7"
}
}
],
"links": {
"first": "http:\/\/localhost\/api\/accounts?page=1",
"last": "http:\/\/localhost\/api\/accounts?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "http:\/\/localhost\/api\/accounts",
"per_page": 15,
"to": 7,
"total": 7
}
}
HTTP Request
GET api/accounts
Add new Google Ads Account to client account
Requires authentication
Example request:
curl -X POST "https://api.clickfraud.app/api/accounts" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"google_ads_id":"123-456-7890","cross_block_participant":true,"client_id":1}'
const url = new URL("https://api.clickfraud.app/api/accounts");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
let body = {
"google_ads_id": "123-456-7890",
"cross_block_participant": true,
"client_id": 1
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/accounts
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
google_ads_id | string | required | The Google Ads account ID to add. |
cross_block_participant | boolean | required | Whether to enable cross_block_participant. |
client_id | integer | optional | The ID of the client to add the account to. Agent only. |
Get associated Google Ads account
Requires authentication
Example request:
curl -X GET -G "https://api.clickfraud.app/api/accounts/{account}" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/accounts/{account}");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"id": 1,
"client_id": 1,
"google_ads_id": "123-456-7890",
"auto_tagging_enabled": true,
"current_tracking_template": null,
"cross_block_participant": true,
"added": "2018-08-03 16:38:42",
"links": {
"self": "http:\/\/api.clickfraud.app\/api\/accounts\/1"
}
}
}
HTTP Request
GET api/accounts/{account}
Remove Google Ads account from associated Client
Requires authentication
Example request:
curl -X DELETE "https://api.clickfraud.app/api/accounts/{account}" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/accounts/{account}");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE api/accounts/{account}
Account statistics
Class StatisticsController
Get all statistics for an account
Requires authentication
Example request:
curl -X GET -G "https://api.clickfraud.app/api/accounts/{account_id}/exclusion-stats" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/accounts/{account_id}/exclusion-stats");
let params = {
"from-timestamp": "2019-04-01 00:00:00",
"to-timestamp": "2019-05-01 00:00:00",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [],
"links": {
"first": "http:\/\/localhost\/api\/accounts\/1\/exclusion-stats?page=1",
"last": "http:\/\/localhost\/api\/accounts\/1\/exclusion-stats?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": null,
"last_page": 1,
"path": "http:\/\/localhost\/api\/accounts\/1\/exclusion-stats",
"per_page": 15,
"to": null,
"total": 0
}
}
HTTP Request
GET api/accounts/{account_id}/exclusion-stats
Query Parameters
Parameter | Status | Description |
---|---|---|
from-timestamp | optional | Filter the results from timestamp. |
to-timestamp | optional | Filter the results to timestamp. |
Authentication
Authorize a client to access the user's account.
Example request:
curl -X GET -G "https://api.clickfraud.app/oauth/authorize" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/oauth/authorize");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET oauth/authorize
Approve the authorization request.
Example request:
curl -X POST "https://api.clickfraud.app/oauth/authorize" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/oauth/authorize");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST oauth/authorize
Deny the authorization request.
Example request:
curl -X DELETE "https://api.clickfraud.app/oauth/authorize" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/oauth/authorize");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE oauth/authorize
Authorize a client to access the user's account.
Example request:
curl -X POST "https://api.clickfraud.app/oauth/token" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/oauth/token");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST oauth/token
Get all of the authorized tokens for the authenticated user.
Example request:
curl -X GET -G "https://api.clickfraud.app/oauth/tokens" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/oauth/tokens");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET oauth/tokens
Delete the given token.
Example request:
curl -X DELETE "https://api.clickfraud.app/oauth/tokens/{token_id}" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/oauth/tokens/{token_id}");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE oauth/tokens/{token_id}
Get a fresh transient token cookie for the authenticated user.
Example request:
curl -X POST "https://api.clickfraud.app/oauth/token/refresh" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/oauth/token/refresh");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST oauth/token/refresh
Get all of the clients for the authenticated user.
Example request:
curl -X GET -G "https://api.clickfraud.app/oauth/clients" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/oauth/clients");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET oauth/clients
Store a new client.
Example request:
curl -X POST "https://api.clickfraud.app/oauth/clients" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/oauth/clients");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST oauth/clients
Update the given client.
Example request:
curl -X PUT "https://api.clickfraud.app/oauth/clients/{client_id}" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/oauth/clients/{client_id}");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "PUT",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
PUT oauth/clients/{client_id}
Delete the given client.
Example request:
curl -X DELETE "https://api.clickfraud.app/oauth/clients/{client_id}" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/oauth/clients/{client_id}");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE oauth/clients/{client_id}
Get all of the available scopes for the application.
Example request:
curl -X GET -G "https://api.clickfraud.app/oauth/scopes" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/oauth/scopes");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET oauth/scopes
Get all of the personal access tokens for the authenticated user.
Example request:
curl -X GET -G "https://api.clickfraud.app/oauth/personal-access-tokens" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/oauth/personal-access-tokens");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET oauth/personal-access-tokens
Create a new personal access token for the user.
Example request:
curl -X POST "https://api.clickfraud.app/oauth/personal-access-tokens" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/oauth/personal-access-tokens");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST oauth/personal-access-tokens
Delete the given token.
Example request:
curl -X DELETE "https://api.clickfraud.app/oauth/personal-access-tokens/{token_id}" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/oauth/personal-access-tokens/{token_id}");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE oauth/personal-access-tokens/{token_id}
Campaign IP Exclusions
View campaign IP exclusions by account
Get all IP Exclusions
Requires authentication
Example request:
curl -X GET -G "https://api.clickfraud.app/api/accounts/{account_id}/campaigns/{campaign_id}/ips" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/accounts/{account_id}/campaigns/{campaign_id}/ips");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [
{
"ip_address": "192.168.1.1\/32"
},
{
"ip_address": "192.168.1.2\/32"
}
],
"links": {
"first": "http:\/\/localhost\/api\/accounts\/1\/campaigns\/1\/ips?page=1",
"last": "http:\/\/localhost\/api\/accounts\/1\/campaigns\/1\/ips?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "http:\/\/localhost\/api\/accounts\/1\/campaigns\/1\/ips",
"per_page": 15,
"to": 2,
"total": 2
}
}
HTTP Request
GET api/accounts/{account_id}/campaigns/{campaign_id}/ips
Campaigns
View campaigns by account
Get all campaigns
Requires authentication
Example request:
curl -X GET -G "https://api.clickfraud.app/api/accounts/{account_id}/campaigns" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/accounts/{account_id}/campaigns");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [
{
"id": 1,
"name": "*Jo Blogs - London - Generic",
"status": "ENABLED",
"google_ads_id": "123-456-7890",
"exclude_from_blocks": false
}
],
"links": {
"first": "http:\/\/localhost\/api\/accounts\/1\/campaigns?page=1",
"last": "http:\/\/localhost\/api\/accounts\/1\/campaigns?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "http:\/\/localhost\/api\/accounts\/1\/campaigns",
"per_page": 15,
"to": 1,
"total": 1
}
}
HTTP Request
GET api/accounts/{account_id}/campaigns
Get campaign
Requires authentication
Example request:
curl -X GET -G "https://api.clickfraud.app/api/accounts/{account_id}/campaigns/{campaign}" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/accounts/{account_id}/campaigns/{campaign}");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"id": 1,
"name": "*Jo Blogs - London - Generic",
"status": "ENABLED",
"google_ads_id": "123-456-7890",
"exclude_from_blocks": false
}
}
HTTP Request
GET api/accounts/{account_id}/campaigns/{campaign}
Update campaign
Requires authentication
Example request:
curl -X PUT "https://api.clickfraud.app/api/accounts/{account_id}/campaigns/{campaign}" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"exclude_from_blocks":false}'
const url = new URL("https://api.clickfraud.app/api/accounts/{account_id}/campaigns/{campaign}");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
let body = {
"exclude_from_blocks": false
}
fetch(url, {
method: "PUT",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
PUT api/accounts/{account_id}/campaigns/{campaign}
PATCH api/accounts/{account_id}/campaigns/{campaign}
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
exclude_from_blocks | boolean | required | Exclude this campaign. |
Client Accounts
Control your Google Ad Accounts
Get all associated Google Ads accounts
Requires authentication
Example request:
curl -X GET -G "https://api.clickfraud.app/api/clients/{client_id}/accounts" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/clients/{client_id}/accounts");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [
{
"id": 1,
"client_id": 1,
"google_ads_id": "123-456-7890",
"auto_tagging_enabled": true,
"current_tracking_template": null,
"cross_block_participant": true,
"added": "2018-08-03 16:38:42",
"links": {
"self": "http:\/\/api.clickfraud.app\/api\/accounts\/1"
}
},
{
"id": 3,
"client_id": 1,
"google_ads_id": "111-111-1112",
"auto_tagging_enabled": null,
"current_tracking_template": null,
"cross_block_participant": true,
"added": "2019-04-18 13:43:22",
"links": {
"self": "http:\/\/api.clickfraud.app\/api\/accounts\/3"
}
},
{
"id": 4,
"client_id": 1,
"google_ads_id": "111-111-1113",
"auto_tagging_enabled": null,
"current_tracking_template": null,
"cross_block_participant": true,
"added": "2019-04-18 13:43:32",
"links": {
"self": "http:\/\/api.clickfraud.app\/api\/accounts\/4"
}
},
{
"id": 5,
"client_id": 1,
"google_ads_id": "111-111-1114",
"auto_tagging_enabled": null,
"current_tracking_template": null,
"cross_block_participant": true,
"added": "2019-04-18 13:44:04",
"links": {
"self": "http:\/\/api.clickfraud.app\/api\/accounts\/5"
}
},
{
"id": 6,
"client_id": 1,
"google_ads_id": "111-111-1115",
"auto_tagging_enabled": null,
"current_tracking_template": null,
"cross_block_participant": true,
"added": "2019-04-18 13:44:38",
"links": {
"self": "http:\/\/api.clickfraud.app\/api\/accounts\/6"
}
},
{
"id": 7,
"client_id": 1,
"google_ads_id": "111-111-1116",
"auto_tagging_enabled": null,
"current_tracking_template": null,
"cross_block_participant": true,
"added": "2019-04-18 13:46:17",
"links": {
"self": "http:\/\/api.clickfraud.app\/api\/accounts\/7"
}
}
],
"links": {
"first": "http:\/\/localhost\/api\/clients\/1\/accounts?page=1",
"last": "http:\/\/localhost\/api\/clients\/1\/accounts?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "http:\/\/localhost\/api\/clients\/1\/accounts",
"per_page": 15,
"to": 6,
"total": 6
}
}
HTTP Request
GET api/clients/{client_id}/accounts
Client Exclusions
View exclusions by client
Get all exclusions for client
Requires authentication
Example request:
curl -X GET -G "https://api.clickfraud.app/api/clients/{client_id}/exclusions" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/clients/{client_id}/exclusions");
let params = {
"from-timestamp": "2019-04-01 00:00:00",
"to-timestamp": "2019-05-01 00:00:00",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [
{
"id": "5ca19487f7dd395833634f9f",
"tkey": "aFG7dand1YqCR",
"domain_name": "rapid-locksmiths.co.uk",
"visitor_ip": "2a00:23c5:bf00:7700:e00c:98aa:46b1:1bf",
"block_surpressed": 0,
"block_type": "excessive",
"rule_broken_text": "EXC_2_CLICKS_240_Minute(s)_Block",
"timestamp": {
"$date": {
"$numberLong": "1554093191000"
}
}
},
{
"id": "5ca1b3b2f7dd3958295058eb",
"tkey": "aFG7dand1YqCR",
"domain_name": "rapid-locksmiths.co.uk",
"visitor_ip": "209.93.131.18",
"block_surpressed": 0,
"block_type": "excessive",
"rule_broken_text": "EXC_2_CLICKS_240_Minute(s)_Block",
"timestamp": {
"$date": {
"$numberLong": "1554101170000"
}
}
},
{
"id": "5ca1ba51f7dd3957f809bf2c",
"tkey": "aFG7dand1YqCR",
"domain_name": "rapid-locksmiths.co.uk",
"visitor_ip": "92.40.249.169",
"block_surpressed": 0,
"block_type": "excessive",
"rule_broken_text": "EXC_2_CLICKS_240_Minute(s)_Block",
"timestamp": {
"$date": {
"$numberLong": "1554102865000"
}
}
},
{
"id": "5ca1c9adf7dd39580624d4ce",
"tkey": "aFG7dand1YqCR",
"domain_name": "rapid-locksmiths.co.uk",
"visitor_ip": "81.111.202.246",
"block_surpressed": 0,
"block_type": "excessive",
"rule_broken_text": "EXC_2_CLICKS_240_Minute(s)_Block",
"timestamp": {
"$date": {
"$numberLong": "1554106797000"
}
}
},
{
"id": "5ca1cfb5f7dd3957e554320f",
"tkey": "aFG7dand1YqCR",
"domain_name": "rapid-locksmiths.co.uk",
"visitor_ip": "209.93.89.157",
"block_surpressed": 0,
"block_type": "excessive",
"rule_broken_text": "EXC_2_CLICKS_240_Minute(s)_Block",
"timestamp": {
"$date": {
"$numberLong": "1554108341000"
}
}
},
{
"id": "5ca1d25af7dd3957f809c097",
"tkey": "aFG7dand1YqCR",
"domain_name": "rapid-locksmiths.co.uk",
"visitor_ip": "2a02:c7f:a014:5800:24a9:883e:974c:ba85",
"block_surpressed": 0,
"block_type": "excessive",
"rule_broken_text": "EXC_2_CLICKS_240_Minute(s)_Block",
"timestamp": {
"$date": {
"$numberLong": "1554109018000"
}
}
},
{
"id": "5ca1c1fcf7dd3957ec7b1068",
"tkey": "aFG7dand1YqCR",
"domain_name": "rapid-locksmiths.co.uk",
"visitor_ip": "2a02:c7d:267e:7100:59eb:64f1:7561:91f5",
"block_surpressed": 0,
"block_type": "excessive",
"rule_broken_text": "EXC_2_CLICKS_240_Minute(s)_Block",
"timestamp": {
"$date": {
"$numberLong": "1554104828000"
}
}
},
{
"id": "5ca1c8d4f7dd39581e7c6baa",
"tkey": "aFG7dand1YqCR",
"domain_name": "rapid-locksmiths.co.uk",
"visitor_ip": "146.199.141.198",
"block_surpressed": 0,
"block_type": "excessive",
"rule_broken_text": "EXC_2_CLICKS_240_Minute(s)_Block",
"timestamp": {
"$date": {
"$numberLong": "1554106580000"
}
}
},
{
"id": "5ca1caadf7dd39580624d4e1",
"tkey": "aFG7dand1YqCR",
"domain_name": "rapid-locksmiths.co.uk",
"visitor_ip": "82.153.98.155",
"block_surpressed": 0,
"block_type": "excessive",
"rule_broken_text": "EXC_2_CLICKS_240_Minute(s)_Block",
"timestamp": {
"$date": {
"$numberLong": "1554107053000"
}
}
},
{
"id": "5ca1c24cf7dd3957ef6f8353",
"tkey": "aFG7dand1YqCR",
"domain_name": "rapid-locksmiths.co.uk",
"visitor_ip": "86.24.124.168",
"block_surpressed": 0,
"block_type": "excessive",
"rule_broken_text": "EXC_2_CLICKS_240_Minute(s)_Block",
"timestamp": {
"$date": {
"$numberLong": "1554104908000"
}
}
},
{
"id": "5ca1c63df7dd395807792e0e",
"tkey": "aFG7dand1YqCR",
"domain_name": "rapid-locksmiths.co.uk",
"visitor_ip": "80.71.19.225",
"block_surpressed": 0,
"block_type": "excessive",
"rule_broken_text": "EXC_2_CLICKS_240_Minute(s)_Block",
"timestamp": {
"$date": {
"$numberLong": "1554105917000"
}
}
},
{
"id": "5ca1b1dbf7dd395803271c9f",
"tkey": "aFG7dand1YqCR",
"domain_name": "rapid-locksmiths.co.uk",
"visitor_ip": "2a00:23c4:ce0e:ed00:a148:f607:3180:9af6",
"block_surpressed": 0,
"block_type": "excessive",
"rule_broken_text": "EXC_2_CLICKS_240_Minute(s)_Block",
"timestamp": {
"$date": {
"$numberLong": "1554100699000"
}
}
},
{
"id": "5ca1befef7dd3957ed7862cd",
"tkey": "aFG7dand1YqCR",
"domain_name": "rapid-locksmiths.co.uk",
"visitor_ip": "176.12.107.132",
"block_surpressed": 0,
"block_type": "excessive",
"rule_broken_text": "EXC_2_CLICKS_240_Minute(s)_Block",
"timestamp": {
"$date": {
"$numberLong": "1554104062000"
}
}
},
{
"id": "5ca1c78df7dd3957f73038f5",
"tkey": "aFG7dand1YqCR",
"domain_name": "rapid-locksmiths.co.uk",
"visitor_ip": "81.109.120.139",
"block_surpressed": 0,
"block_type": "excessive",
"rule_broken_text": "EXC_2_CLICKS_240_Minute(s)_Block",
"timestamp": {
"$date": {
"$numberLong": "1554106253000"
}
}
},
{
"id": "5ca1cadcf7dd3958227da2a2",
"tkey": "aFG7dand1YqCR",
"domain_name": "rapid-locksmiths.co.uk",
"visitor_ip": "209.93.20.11",
"block_surpressed": 0,
"block_type": "excessive",
"rule_broken_text": "EXC_2_CLICKS_240_Minute(s)_Block",
"timestamp": {
"$date": {
"$numberLong": "1554107100000"
}
}
}
],
"links": {
"first": "http:\/\/localhost\/api\/clients\/1\/exclusions?page=1",
"last": "http:\/\/localhost\/api\/clients\/1\/exclusions?page=154",
"prev": null,
"next": "http:\/\/localhost\/api\/clients\/1\/exclusions?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 154,
"path": "http:\/\/localhost\/api\/clients\/1\/exclusions",
"per_page": 15,
"to": 15,
"total": 2303
}
}
HTTP Request
GET api/clients/{client_id}/exclusions
Query Parameters
Parameter | Status | Description |
---|---|---|
from-timestamp | optional | Filter the results from timestamp. |
to-timestamp | optional | Filter the results to timestamp. |
Get exclusion for client
Requires authentication
Example request:
curl -X GET -G "https://api.clickfraud.app/api/clients/{client_id}/exclusions/{exclusion}" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/clients/{client_id}/exclusions/{exclusion}");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"id": "5b98f36a1a011129fc6eff27",
"tkey": "aFG7dand1YqCR",
"domain_name": "joblogs.com",
"visitor_ip": "217.43.43.54",
"block_surpressed": null,
"block_type": null,
"rule_broken_text": "EXC_2_CLICKS_7_Days'_Block",
"timestamp": {
"$date": {
"$numberLong": "1536750442000"
}
}
}
}
HTTP Request
GET api/clients/{client_id}/exclusions/{exclusion}
Client Settings
Control client settings
Get all settings
Requires authentication
Example request:
curl -X GET -G "https://api.clickfraud.app/api/clients/{client_id}/settings" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/clients/{client_id}/settings");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [
{
"id": "5cd445504e210320cf037840",
"tkey": "04vZGrxwAMw5CZV",
"client_id": 1,
"global_threat_network": null,
"anonymiser": null,
"fingerprinting": true,
"user_type_blocking": null,
"user_type_blocks": null
}
],
"links": {
"first": "http:\/\/localhost\/api\/clients\/1\/settings?page=1",
"last": "http:\/\/localhost\/api\/clients\/1\/settings?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "http:\/\/localhost\/api\/clients\/1\/settings",
"per_page": 15,
"to": 1,
"total": 1
}
}
HTTP Request
GET api/clients/{client_id}/settings
Get setting
Requires authentication
Example request:
curl -X GET -G "https://api.clickfraud.app/api/clients/{client_id}/settings/{setting}" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/clients/{client_id}/settings/{setting}");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"id": "5cd445504e210320cf037840",
"tkey": "04vZGrxwAMw5CZV",
"client_id": 1,
"global_threat_network": null,
"anonymiser": null,
"fingerprinting": true,
"user_type_blocking": null,
"user_type_blocks": null
}
}
HTTP Request
GET api/clients/{client_id}/settings/{setting}
Update settings
Requires authentication
Example request:
curl -X PUT "https://api.clickfraud.app/api/clients/{client_id}/settings/{setting}" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"global_threat_network":true,"anonymiser":false,"fingerprinting":false,"user_type_blocking":true,"user_type_blocks":{"businesses":true,"cafes":false,"cellular":false,"colleges":true,"cdn":true,"dialup":false,"gov":false,"schools":true,"library":false,"military":false,"residential":false,"traveler":"4DNNKt8x3mFV3h77"}}'
const url = new URL("https://api.clickfraud.app/api/clients/{client_id}/settings/{setting}");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
let body = {
"global_threat_network": true,
"anonymiser": false,
"fingerprinting": false,
"user_type_blocking": true,
"user_type_blocks": {
"businesses": true,
"cafes": false,
"cellular": false,
"colleges": true,
"cdn": true,
"dialup": false,
"gov": false,
"schools": true,
"library": false,
"military": false,
"residential": false,
"traveler": "4DNNKt8x3mFV3h77"
}
}
fetch(url, {
method: "PUT",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
PUT api/clients/{client_id}/settings/{setting}
PATCH api/clients/{client_id}/settings/{setting}
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
global_threat_network | boolean | optional | Toggle Global Threat Network blocking. |
anonymiser | boolean | optional | Toggle anonymiser. |
fingerprinting | boolean | optional | Toggle fingerprinting. |
user_type_blocking | boolean | optional | Toggle user type blocking. |
user_type_blocks | array | optional | Control user type blocking. |
user_type_blocks.businesses | boolean | optional | Control businesses block. |
user_type_blocks.cafes | boolean | optional | Control cafes block. |
user_type_blocks.cellular | boolean | optional | Control cellular block. |
user_type_blocks.colleges | boolean | optional | Control colleges block. |
user_type_blocks.cdn | boolean | optional | Control cdn block. |
user_type_blocks.dialup | boolean | optional | Control dialup block. |
user_type_blocks.gov | boolean | optional | Control gov block. |
user_type_blocks.schools | boolean | optional | Control schools block. |
user_type_blocks.library | boolean | optional | Control library block. |
user_type_blocks.military | boolean | optional | Control military block. |
user_type_blocks.residential | boolean | optional | Control residential block. |
user_type_blocks.traveler | Control | optional | traveler block. |
Client Visitors
View visitors by client
Get all visitors for a client
Requires authentication
Example request:
curl -X GET -G "https://api.clickfraud.app/api/clients/{client_id}/visitors" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/clients/{client_id}/visitors");
let params = {
"from-timestamp": "2019-04-01 00:00:00",
"to-timestamp": "2019-05-01 00:00:00",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [],
"links": {
"first": "http:\/\/localhost\/api\/clients\/1\/visitors?page=1",
"last": "http:\/\/localhost\/api\/clients\/1\/visitors?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": null,
"last_page": 1,
"path": "http:\/\/localhost\/api\/clients\/1\/visitors",
"per_page": 15,
"to": null,
"total": 0
}
}
HTTP Request
GET api/clients/{client_id}/visitors
Query Parameters
Parameter | Status | Description |
---|---|---|
from-timestamp | optional | Filter the results from timestamp. |
to-timestamp | optional | Filter the results to timestamp. |
Get visitor for client
Requires authentication
Example request:
curl -X GET -G "https://api.clickfraud.app/api/clients/{client_id}/visitors/{visitor}" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/clients/{client_id}/visitors/{visitor}");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"id": "5cdd92baf7dd392e29791765",
"fp": "a7f996d7d96edb458eec9a201a95f019",
"ip": "92.21.151.113",
"site": "joblogs.com",
"page_title": "Mendelssohn Pilot Supplies | Pilot Shop",
"country_code": "GB",
"country_name": null,
"current_url": "https:\/\/www.gps.co.uk\/",
"refferer_url": "",
"page_view": "1",
"key": "aFG7dand1YqCR",
"is_bot": false,
"client_info": {
"type": "browser",
"name": "Chrome",
"short_name": "CH",
"version": "74.0.3729.131",
"engine": "Blink",
"engine_version": ""
},
"client_os": null,
"client_brand": "",
"client_model": "",
"client_device": 0,
"gclid": "",
"msclkid": "",
"is_paid": false,
"timestamp": "2019-05-16T16:41:30.000000Z"
}
}
HTTP Request
GET api/clients/{client_id}/visitors/{visitor}
Clients
Manage clients
Get the javascript tracking code for client
Requires authentication
Example request:
curl -X GET -G "https://api.clickfraud.app/api/clients/{client_id}/tracking-code" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/clients/{client_id}/tracking-code");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"tracking_code": "<script type=\"text\/javascript\">\n\n var _cgk = 'aFG7dand1YqCR';\n\n (function () {\n var _cg = document.createElement('script'); _cg.type = 'text\/javascript'; _cg.async = true;\n _cg.src = 'https:\/\/v2.clickguardian.app\/track.js';\n var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(_cg, s);\n })();\n\n<\/script>\n\n"
}
}
HTTP Request
GET api/clients/{client_id}/tracking-code
Get all clients
Requires authentication
Example request:
curl -X GET -G "https://api.clickfraud.app/api/clients" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/clients");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [
{
"id": 1,
"tkey": "aFG7dand1YqCR",
"company_name": "Jo Blogs Client",
"firstname": "Jo",
"surname": "Blogs",
"email": "jo@blogs.com",
"added": "2019-04-05 13:07:38"
},
{
"id": 2,
"tkey": "aFG7dand1YqCR",
"company_name": "Jo Blogs Client",
"firstname": "Jo",
"surname": "Blogs",
"email": "jo@blogs.com",
"added": "2019-04-05 13:07:38"
}
],
"links": {
"first": "http:\/\/localhost\/api\/clients?page=1",
"last": "http:\/\/localhost\/api\/clients?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "http:\/\/localhost\/api\/clients",
"per_page": 15,
"to": 2,
"total": 2
}
}
HTTP Request
GET api/clients
Create a new client
Requires authentication
Example request:
curl -X POST "https://api.clickfraud.app/api/clients" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"company_name":"Click Guardian LTD","firstname":"Joe","surname":"Blogs","email":"jo@blogs.com"}'
const url = new URL("https://api.clickfraud.app/api/clients");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
let body = {
"company_name": "Click Guardian LTD",
"firstname": "Joe",
"surname": "Blogs",
"email": "jo@blogs.com"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/clients
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
company_name | string | required | Company Name. |
firstname | string | required | Contact first name. |
surname | string | required | Contact last name. |
string | required | Contact email address. |
Get client
Requires authentication
Example request:
curl -X GET -G "https://api.clickfraud.app/api/clients/{client}" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/clients/{client}");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"id": 1,
"tkey": "aFG7dand1YqCR",
"company_name": "Jo Blogs Client",
"firstname": "Jo",
"surname": "Blogs",
"email": "jo@blogs.com",
"added": "2019-04-05 13:07:38"
}
}
HTTP Request
GET api/clients/{client}
Update client
Requires authentication
Example request:
curl -X PUT "https://api.clickfraud.app/api/clients/{client}" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"company_name":"Click Guardian LTD","firstname":"Joe","surname":"Blogs","email":"jo@blogs.com"}'
const url = new URL("https://api.clickfraud.app/api/clients/{client}");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
let body = {
"company_name": "Click Guardian LTD",
"firstname": "Joe",
"surname": "Blogs",
"email": "jo@blogs.com"
}
fetch(url, {
method: "PUT",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
PUT api/clients/{client}
PATCH api/clients/{client}
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
company_name | string | required | Company Name. |
firstname | string | required | Contact first name. |
surname | string | required | Contact last name. |
string | required | Contact email address. |
Remove client
Requires authentication
Example request:
curl -X DELETE "https://api.clickfraud.app/api/clients/{client}" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/clients/{client}");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE api/clients/{client}
Domain Exclusions
View exclusions by domain
Get all exclusions for domain
Requires authentication
Example request:
curl -X GET -G "https://api.clickfraud.app/api/domains/{domain_id}/exclusions" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/domains/{domain_id}/exclusions");
let params = {
"from-timestamp": "2019-04-01 00:00:00",
"to-timestamp": "2019-05-01 00:00:00",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [],
"links": {
"first": "http:\/\/localhost\/api\/domains\/1\/exclusions?page=1",
"last": "http:\/\/localhost\/api\/domains\/1\/exclusions?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": null,
"last_page": 1,
"path": "http:\/\/localhost\/api\/domains\/1\/exclusions",
"per_page": 15,
"to": null,
"total": 0
}
}
HTTP Request
GET api/domains/{domain_id}/exclusions
Query Parameters
Parameter | Status | Description |
---|---|---|
from-timestamp | optional | Filter the results from timestamp. |
to-timestamp | optional | Filter the results to timestamp. |
Get exclusion for domain
Requires authentication
Example request:
curl -X GET -G "https://api.clickfraud.app/api/domains/{domain_id}/exclusions/{exclusion}" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/domains/{domain_id}/exclusions/{exclusion}");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"id": "5b98f36a1a011129fc6eff27",
"tkey": "aFG7dand1YqCR",
"domain_name": "joblogs.com",
"visitor_ip": "217.43.43.54",
"block_surpressed": null,
"block_type": null,
"rule_broken_text": "EXC_2_CLICKS_7_Days'_Block",
"timestamp": {
"$date": {
"$numberLong": "1536750442000"
}
}
}
}
HTTP Request
GET api/domains/{domain_id}/exclusions/{exclusion}
Domain Visitors
View visitors by domain
Get all visitors for domain
Requires authentication
Example request:
curl -X GET -G "https://api.clickfraud.app/api/domains/{domain_id}/visitors" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/domains/{domain_id}/visitors");
let params = {
"from-timestamp": "2019-04-01 00:00:00",
"to-timestamp": "2019-05-01 00:00:00",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [],
"links": {
"first": "http:\/\/localhost\/api\/domains\/1\/visitors?page=1",
"last": "http:\/\/localhost\/api\/domains\/1\/visitors?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": null,
"last_page": 1,
"path": "http:\/\/localhost\/api\/domains\/1\/visitors",
"per_page": 15,
"to": null,
"total": 0
}
}
HTTP Request
GET api/domains/{domain_id}/visitors
Query Parameters
Parameter | Status | Description |
---|---|---|
from-timestamp | optional | Filter the results from timestamp. |
to-timestamp | optional | Filter the results to timestamp. |
Get visitor for domain
Requires authentication
Example request:
curl -X GET -G "https://api.clickfraud.app/api/domains/{domain_id}/visitors/{visitor}" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/domains/{domain_id}/visitors/{visitor}");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"id": "5cdd92baf7dd392e29791765",
"fp": "a7f996d7d96edb458eec9a201a95f019",
"ip": "92.21.151.113",
"site": "joblogs.com",
"page_title": "Mendelssohn Pilot Supplies | Pilot Shop",
"country_code": "GB",
"country_name": null,
"current_url": "https:\/\/www.gps.co.uk\/",
"refferer_url": "",
"page_view": "1",
"key": "aFG7dand1YqCR",
"is_bot": false,
"client_info": {
"type": "browser",
"name": "Chrome",
"short_name": "CH",
"version": "74.0.3729.131",
"engine": "Blink",
"engine_version": ""
},
"client_os": null,
"client_brand": "",
"client_model": "",
"client_device": 0,
"gclid": "",
"msclkid": "",
"is_paid": false,
"timestamp": "2019-05-16T16:41:30.000000Z"
}
}
HTTP Request
GET api/domains/{domain_id}/visitors/{visitor}
Domains
Control which domains are used for your accounts
Get all domains
Requires authentication
Example request:
curl -X GET -G "https://api.clickfraud.app/api/domains" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/domains");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [
{
"id": 1,
"client_id": 1,
"adsaccid": 1,
"domain_name": "joblogs.com",
"primary_domain": false
}
],
"links": {
"first": "http:\/\/localhost\/api\/domains?page=1",
"last": "http:\/\/localhost\/api\/domains?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "http:\/\/localhost\/api\/domains",
"per_page": 15,
"to": 1,
"total": 1
}
}
HTTP Request
GET api/domains
Create a new domain
Requires authentication
Example request:
curl -X POST "https://api.clickfraud.app/api/domains" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"domain_name":"clickfraud.app","adsaccid":1,"agent_id":1,"client_id":1}'
const url = new URL("https://api.clickfraud.app/api/domains");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
let body = {
"domain_name": "clickfraud.app",
"adsaccid": 1,
"agent_id": 1,
"client_id": 1
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/domains
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
domain_name | string | required | Domain name to add, without www or http. |
adsaccid | integer | required | The ID of the account to add the domain to. |
agent_id | integer | optional | The ID of the agent to add the domain to. Admin only. |
client_id | integer | optional | The ID of the client to add the domain to. Agent only. . |
Get domain
Requires authentication
Example request:
curl -X GET -G "https://api.clickfraud.app/api/domains/{domain}" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/domains/{domain}");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"id": 1,
"client_id": 1,
"adsaccid": 1,
"domain_name": "joblogs.com",
"primary_domain": false
}
}
HTTP Request
GET api/domains/{domain}
Update domain
Requires authentication
Example request:
curl -X PUT "https://api.clickfraud.app/api/domains/{domain}" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"domain_name":"clickfraud.app","adsaccid":1,"agent_id":1,"client_id":1}'
const url = new URL("https://api.clickfraud.app/api/domains/{domain}");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
let body = {
"domain_name": "clickfraud.app",
"adsaccid": 1,
"agent_id": 1,
"client_id": 1
}
fetch(url, {
method: "PUT",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
PUT api/domains/{domain}
PATCH api/domains/{domain}
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
domain_name | string | required | Domain name to add, without www or http. |
adsaccid | integer | required | The ID of the account to add the domain to. |
agent_id | integer | optional | The ID of the agent to add the domain to. Admin only. |
client_id | integer | optional | The ID of the client to add the domain to. Agent only. . |
Remove domain
Requires authentication
Example request:
curl -X DELETE "https://api.clickfraud.app/api/domains/{domain}" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/domains/{domain}");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE api/domains/{domain}
Domain statistics
View statistics by domain
Get all statistics for domain
Requires authentication
Example request:
curl -X GET -G "https://api.clickfraud.app/api/domains/{domain_id}/statistics" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/domains/{domain_id}/statistics");
let params = {
"from-timestamp": "2019-04-01 00:00:00",
"to-timestamp": "2019-05-01 00:00:00",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [],
"links": {
"first": "http:\/\/localhost\/api\/domains\/1\/statistics?page=1",
"last": "http:\/\/localhost\/api\/domains\/1\/statistics?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": null,
"last_page": 1,
"path": "http:\/\/localhost\/api\/domains\/1\/statistics",
"per_page": 15,
"to": null,
"total": 0
}
}
HTTP Request
GET api/domains/{domain_id}/statistics
Query Parameters
Parameter | Status | Description |
---|---|---|
from-timestamp | optional | Filter the results from timestamp. |
to-timestamp | optional | Filter the results to timestamp. |
Excessive Clicking Rules
Manage excessive clicking rules
Get all rules
Requires authentication
Example request:
curl -X GET -G "https://api.clickfraud.app/api/clients/{client_id}/settings/{setting_id}/excessive-clicking-rules" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/clients/{client_id}/settings/{setting_id}/excessive-clicking-rules");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [
{
"id": "5ccc4ce626625",
"name": "2 Clicks, 24 Hours",
"clicks": "2",
"timing_amount": "24",
"timing_method": "hour",
"action": "block"
},
{
"id": "5ccc4d05e7a7f",
"name": "3 Clicks, 7 Days",
"clicks": "3",
"timing_amount": "7",
"timing_method": "day",
"action": "block"
}
],
"links": {
"first": "http:\/\/localhost\/api\/clients\/1\/settings\/5cd445504e210320cf037840\/excessive-clicking-rules?page=1",
"last": "http:\/\/localhost\/api\/clients\/1\/settings\/5cd445504e210320cf037840\/excessive-clicking-rules?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "http:\/\/localhost\/api\/clients\/1\/settings\/5cd445504e210320cf037840\/excessive-clicking-rules",
"per_page": 15,
"to": 2,
"total": 2
}
}
HTTP Request
GET api/clients/{client_id}/settings/{setting_id}/excessive-clicking-rules
Create new rule
Requires authentication
Example request:
curl -X POST "https://api.clickfraud.app/api/clients/{client_id}/settings/{setting_id}/excessive-clicking-rules" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"name":"EXC_2_CLICKS_240_Minute(s)_Block","clicks":20,"timing_amount":10,"timing_method":"day","action":"block"}'
const url = new URL("https://api.clickfraud.app/api/clients/{client_id}/settings/{setting_id}/excessive-clicking-rules");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
let body = {
"name": "EXC_2_CLICKS_240_Minute(s)_Block",
"clicks": 20,
"timing_amount": 10,
"timing_method": "day",
"action": "block"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/clients/{client_id}/settings/{setting_id}/excessive-clicking-rules
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
name | string | required | The rule name. |
clicks | integer | required | The number of click required to trigger rule. Exmaple: 10 |
timing_amount | integer | required | Time for rule. |
timing_method | string | required | Timing method, one of: minute, hour, day. |
action | string | required | The action to perform, one of: block, notify. |
Get rule
Requires authentication
Example request:
curl -X GET -G "https://api.clickfraud.app/api/clients/{client_id}/settings/{setting_id}/excessive-clicking-rules/{excessive_clicking_rule}" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/clients/{client_id}/settings/{setting_id}/excessive-clicking-rules/{excessive_clicking_rule}");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"id": "5ccc4ce626625",
"name": "2 Clicks, 24 Hours",
"clicks": "2",
"timing_amount": "24",
"timing_method": "hour",
"action": "block"
}
}
HTTP Request
GET api/clients/{client_id}/settings/{setting_id}/excessive-clicking-rules/{excessive_clicking_rule}
Update rule
Requires authentication
Example request:
curl -X PUT "https://api.clickfraud.app/api/clients/{client_id}/settings/{setting_id}/excessive-clicking-rules/{excessive_clicking_rule}" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"name":"EXC_2_CLICKS_240_Minute(s)_Block","clicks":7,"timing_amount":10,"timing_method":"day","action":"block"}'
const url = new URL("https://api.clickfraud.app/api/clients/{client_id}/settings/{setting_id}/excessive-clicking-rules/{excessive_clicking_rule}");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
let body = {
"name": "EXC_2_CLICKS_240_Minute(s)_Block",
"clicks": 7,
"timing_amount": 10,
"timing_method": "day",
"action": "block"
}
fetch(url, {
method: "PUT",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
PUT api/clients/{client_id}/settings/{setting_id}/excessive-clicking-rules/{excessive_clicking_rule}
PATCH api/clients/{client_id}/settings/{setting_id}/excessive-clicking-rules/{excessive_clicking_rule}
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
name | string | required | The rule name. |
clicks | integer | required | The number of click required to trigger rule. Exmaple: 10 |
timing_amount | integer | required | Time for rule. |
timing_method | string | required | Timing method, one of: minute, hour, day. |
action | string | required | The action to perform, one of: block, notify. |
Delete rule
Requires authentication
Example request:
curl -X DELETE "https://api.clickfraud.app/api/clients/{client_id}/settings/{setting_id}/excessive-clicking-rules/{excessive_clicking_rule}" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/clients/{client_id}/settings/{setting_id}/excessive-clicking-rules/{excessive_clicking_rule}");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE api/clients/{client_id}/settings/{setting_id}/excessive-clicking-rules/{excessive_clicking_rule}
Mobile App Exclusions
View Mobile App Exclusions by account
Get Mobile App Exclusions
Requires authentication
Example request:
curl -X GET -G "https://api.clickfraud.app/api/accounts/{account_id}/mobile-app-exclusions" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/accounts/{account_id}/mobile-app-exclusions");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"total_campaigns": 0,
"all_apps": 0,
"ms_app_store": 0,
"google_play_store": 0,
"apple_app_store": 0
}
}
HTTP Request
GET api/accounts/{account_id}/mobile-app-exclusions
Add Mobile App Exclusions
Requires authentication
Example request:
curl -X POST "https://api.clickfraud.app/api/accounts/{account_id}/mobile-app-exclusions" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"exclusions":[]}'
const url = new URL("https://api.clickfraud.app/api/accounts/{account_id}/mobile-app-exclusions");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
let body = {
"exclusions": []
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/accounts/{account_id}/mobile-app-exclusions
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
exclusions | array | required | Array of the exclusions, Options: total_campaigns, all_apps, ms_app_store, google_play_store, apple_app_store |
Delete Mobile App Exclusions
Requires authentication
Example request:
curl -X DELETE "https://api.clickfraud.app/api/accounts/{account_id}/mobile-app-exclusions" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/accounts/{account_id}/mobile-app-exclusions");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE api/accounts/{account_id}/mobile-app-exclusions
Get Mobile App Exclusion statistics
Requires authentication
Example request:
curl -X GET -G "https://api.clickfraud.app/api/accounts/{account_id}/mobile-app-exclusion-stats" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/accounts/{account_id}/mobile-app-exclusion-stats");
let params = {
"period": "2Tk8pdx7HnaurbSd",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET api/accounts/{account_id}/mobile-app-exclusion-stats
Query Parameters
Parameter | Status | Description |
---|---|---|
period | optional | You can filter by 7, 14 or 30 days. 30 days by default. Use 7, 14 or 30 in the query. |
Reports
Manage reports
Get all reports
Requires authentication
Example request:
curl -X GET -G "https://api.clickfraud.app/api/reports" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/reports");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [
{
"id": 1,
"client_id": 1,
"receiving_email": "jo@blogs.com",
"real_time": true,
"daily": false,
"weekly": false,
"monthly": false
}
],
"links": {
"first": "http:\/\/localhost\/api\/reports?page=1",
"last": "http:\/\/localhost\/api\/reports?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "http:\/\/localhost\/api\/reports",
"per_page": 15,
"to": 1,
"total": 1
}
}
HTTP Request
GET api/reports
Create a new report
Requires authentication
Example request:
curl -X POST "https://api.clickfraud.app/api/reports" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"receiving_email":"test@test.com","real_time":true,"daily":true,"weekly":true,"monthly":false,"client_id":1}'
const url = new URL("https://api.clickfraud.app/api/reports");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
let body = {
"receiving_email": "test@test.com",
"real_time": true,
"daily": true,
"weekly": true,
"monthly": false,
"client_id": 1
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/reports
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
receiving_email | string | required | Email address to receive report. |
real_time | boolean | optional | optional Send the report in real time. |
daily | boolean | optional | Send the report daily. |
weekly | boolean | optional | Send the report weekly. |
monthly | boolean | optional | Send the report monthly. |
client_id | integer | required | For agent only, specify the client for the report. |
Get report
Requires authentication
Example request:
curl -X GET -G "https://api.clickfraud.app/api/reports/{report}" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/reports/{report}");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"id": 1,
"client_id": 1,
"receiving_email": "jo@blogs.com",
"real_time": true,
"daily": false,
"weekly": false,
"monthly": false
}
}
HTTP Request
GET api/reports/{report}
Update report
Requires authentication
Example request:
curl -X PUT "https://api.clickfraud.app/api/reports/{report}" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"receiving_email":"test@test.com","real_time":true,"daily":true,"weekly":true,"monthly":true,"client_id":1}'
const url = new URL("https://api.clickfraud.app/api/reports/{report}");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
let body = {
"receiving_email": "test@test.com",
"real_time": true,
"daily": true,
"weekly": true,
"monthly": true,
"client_id": 1
}
fetch(url, {
method: "PUT",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
PUT api/reports/{report}
PATCH api/reports/{report}
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
receiving_email | string | required | Email address to receive report. |
real_time | boolean | optional | optional Send the report in real time. |
daily | boolean | optional | Send the report daily. |
weekly | boolean | optional | Send the report weekly. |
monthly | boolean | optional | Send the report monthly. |
client_id | integer | required | For agent only, specify the client for the report. |
Remove report
Requires authentication
Example request:
curl -X DELETE "https://api.clickfraud.app/api/reports/{report}" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/reports/{report}");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE api/reports/{report}
Search Partner Network
View Search Partner Network Stats by account
Get Search Partner Networks
Requires authentication
Example request:
curl -X GET -G "https://api.clickfraud.app/api/accounts/{account_id}/search-partner-network" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"action":"V9kkFMLg2ZmuBh0f"}'
const url = new URL("https://api.clickfraud.app/api/accounts/{account_id}/search-partner-network");
let params = {
"period": "Tq8Tsoe59gxZRAsT",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
let body = {
"action": "V9kkFMLg2ZmuBh0f"
}
fetch(url, {
method: "GET",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET api/accounts/{account_id}/search-partner-network
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
action | string | required | enable or disable |
Query Parameters
Parameter | Status | Description |
---|---|---|
period | optional | Filter by 7, 14 or 30 days. 30 days by default. Use 7, 14 or 30 in the query. |
Get Search Partner Network statistics
Requires authentication
Example request:
curl -X GET -G "https://api.clickfraud.app/api/accounts/{account_id}/search-partner-network-stats" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"action":"2dDUI9fEganlqTHE"}'
const url = new URL("https://api.clickfraud.app/api/accounts/{account_id}/search-partner-network-stats");
let params = {
"period": "j5oV4NWfYcWxRsOG",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
let body = {
"action": "2dDUI9fEganlqTHE"
}
fetch(url, {
method: "GET",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET api/accounts/{account_id}/search-partner-network-stats
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
action | string | required | enable or disable |
Query Parameters
Parameter | Status | Description |
---|---|---|
period | optional | Filter by 7, 14 or 30 days. 30 days by default. Use 7, 14 or 30 in the query. |
Update Search Partner Network
Requires authentication
Example request:
curl -X PATCH "https://api.clickfraud.app/api/accounts/{account_id}/search-partner-network" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"action":"rqoCG5P0xm6EsFK2"}'
const url = new URL("https://api.clickfraud.app/api/accounts/{account_id}/search-partner-network");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
let body = {
"action": "rqoCG5P0xm6EsFK2"
}
fetch(url, {
method: "PATCH",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
PATCH api/accounts/{account_id}/search-partner-network
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
action | string | required | enable or disable |
Users
Manage users
Get all users
Requires authentication
Example request:
curl -X GET -G "https://api.clickfraud.app/api/users" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/users");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [
{
"id": 1,
"email": "jo@blogs.com",
"name": "Jo Blogs",
"status": "enabled",
"registered": "1970-01-01 00:00:01",
"last_login": "1970-01-01 00:00:00",
"client_id": 1
}
],
"links": {
"first": "http:\/\/localhost\/api\/users?page=1",
"last": "http:\/\/localhost\/api\/users?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "http:\/\/localhost\/api\/users",
"per_page": 15,
"to": 1,
"total": 1
}
}
HTTP Request
GET api/users
Create user
Requires authentication
Example request:
curl -X POST "https://api.clickfraud.app/api/users" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"name":"joblogs","email":"jo@blogs.com","password":"foobar123","client_id":2}'
const url = new URL("https://api.clickfraud.app/api/users");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
let body = {
"name": "joblogs",
"email": "jo@blogs.com",
"password": "foobar123",
"client_id": 2
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/users
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
name | string | required | Username. |
string | required | Email address. | |
password | string | optional | Min 8 characters, max 32 characters upper, lower and digits. |
client_id | integer | required | The client to assign the user too. |
Get user
Requires authentication
Example request:
curl -X GET -G "https://api.clickfraud.app/api/users/{user}" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/users/{user}");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"id": 1,
"email": "jo@blogs.com",
"name": "Jo Blogs",
"status": "enabled",
"registered": "1970-01-01 00:00:01",
"last_login": "1970-01-01 00:00:00",
"client_id": 1
}
}
HTTP Request
GET api/users/{user}
Update user
Requires authentication
Example request:
curl -X PUT "https://api.clickfraud.app/api/users/{user}" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"name":"joblogs","email":"jo@blogs.com","password":"foobar123","client_id":2}'
const url = new URL("https://api.clickfraud.app/api/users/{user}");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
let body = {
"name": "joblogs",
"email": "jo@blogs.com",
"password": "foobar123",
"client_id": 2
}
fetch(url, {
method: "PUT",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
PUT api/users/{user}
PATCH api/users/{user}
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
name | string | required | Username. |
string | required | Email address. | |
password | string | optional | Min 8 characters, max 32 characters upper, lower and digits. |
client_id | integer | required | The client to assign the user too. |
Remove user
Requires authentication
Example request:
curl -X DELETE "https://api.clickfraud.app/api/users/{user}" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
const url = new URL("https://api.clickfraud.app/api/users/{user}");
let headers = {
"Authorization": "Bearer {token}",
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE api/users/{user}