Introduction
This documentation aims to provide all the information you need to work with our API.
API versions
/api/v2/ is the current API. Authenticate with a bearer token from POST /api/v2/auth/login.
Legacy endpoints under /api/ (everything except /api/v2/) are deprecated. Support will end on 01.01.2027. Please migrate to /api/v2/.
Rate limits
All routes under /api/* are limited to 60 requests per minute per client IP. If you exceed this limit, the API responds with HTTP 429 Too Many Requests. Space out polling (for example, status/deposit sync jobs) and retry after a short delay when you receive 429.
Authenticating requests
This API is not authenticated.
API v2
Exchange affiliate credentials for an API v2 token pair.
Example request:
curl --request POST \
"http://localhost:8003/api/v2/auth/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"aff_id\": 123,
\"aff_password\": \"12345678\"
}"
const url = new URL(
"http://localhost:8003/api/v2/auth/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"aff_id": 123,
"aff_password": "12345678"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"access_token": "...",
"refresh_token": "...",
"token_type": "Bearer",
"expires_in": 86400,
"refresh_expires_in": 2592000
}
Example response (401):
{
"error": "Affiliate authorization failed!"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Rotate a refresh token into a fresh token pair.
Example request:
curl --request POST \
"http://localhost:8003/api/v2/auth/refresh" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"refresh_token\": \"...\"
}"
const url = new URL(
"http://localhost:8003/api/v2/auth/refresh"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"refresh_token": "..."
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"access_token": "...",
"refresh_token": "...",
"token_type": "Bearer",
"expires_in": 86400,
"refresh_expires_in": 2592000
}
Example response (401):
{
"error": "Invalid or expired refresh token."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Revoke the current user's token pair.
Example request:
curl --request POST \
"http://localhost:8003/api/v2/auth/logout" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8003/api/v2/auth/logout"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"message": "Tokens revoked."
}
Example response (401):
{
"error": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create lead (API v2) Endpoint for creating a lead. Authenticate with the bearer token obtained from POST /api/v2/auth/login; the affiliate is inferred from the token, so aff_id and aff_password are not required.
Example request:
curl --request POST \
"http://localhost:8003/api/v2/leads" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"campaignID\": 960,
\"firstName\": \"Test\",
\"lastName\": \"McTesty\",
\"email\": \"example@m.com\",
\"language\": \"EN\",
\"country\": \"US\",
\"phone_number\": \"1234567890\",
\"phone_code\": \"380\",
\"password\": \"87654321\",
\"key\": \"87654321\",
\"affiliate\": 7,
\"referer\": \"https:\\/\\/google.com\",
\"lander\": \"https:\\/\\/google.com\",
\"ip\": \"145.12.5.13\",
\"landuuid\": \"...\"
}"
const url = new URL(
"http://localhost:8003/api/v2/leads"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"campaignID": 960,
"firstName": "Test",
"lastName": "McTesty",
"email": "example@m.com",
"language": "EN",
"country": "US",
"phone_number": "1234567890",
"phone_code": "380",
"password": "87654321",
"key": "87654321",
"affiliate": 7,
"referer": "https:\/\/google.com",
"lander": "https:\/\/google.com",
"ip": "145.12.5.13",
"landuuid": "..."
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200, Success):
{
"result": 200,
"success": true,
"data": {
"id": 457080,
"url": "https://www.source.com/?token=example"
},
"lead_id": 457080,
"email": "test-mail0684595@msn.com",
"url": "https://www.source.com/?token=example",
"autologin": "https://www.source.com/?token=example"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Virtual endpoint to create a lead for test your settings Endpoint for creating a lead (It doesn't save any data just give you the response virtual data).
Example request:
curl --request POST \
"http://localhost:8003/api/v2/leads/test?campaignID=rerum&firstName=Test&lastName=McTesty&email=example%40m.com&language=EN&country=US&referer=0&lander=0&phone_number=1234567890&phone_code=380&password=87654321&key=87654321&traffic_source=ABC123_AB_C&ip=145.12.5.13&affiliate=9&aff_id=qui&aff_password=2Wed%24Iof6327&landuuid=91888350-9c15-34b1-9d5a-f2601d8ed92d" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8003/api/v2/leads/test"
);
const params = {
"campaignID": "rerum",
"firstName": "Test",
"lastName": "McTesty",
"email": "example@m.com",
"language": "EN",
"country": "US",
"referer": "0",
"lander": "0",
"phone_number": "1234567890",
"phone_code": "380",
"password": "87654321",
"key": "87654321",
"traffic_source": "ABC123_AB_C",
"ip": "145.12.5.13",
"affiliate": "9",
"aff_id": "qui",
"aff_password": "2Wed$Iof6327",
"landuuid": "91888350-9c15-34b1-9d5a-f2601d8ed92d",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200, Success):
{
"result": 200,
"success": true,
"data": {
"id": 457080,
"url": "https://www.source.com/?token=example"
},
"lead_id": 457080,
"email": "test-mail0684595@msn.com",
"url": "https://www.source.com/?token=example",
"autologin": "https://www.cloudflare.com/?token=example"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve lead statuses Endpoint for getting lead response statuses. Authenticate either with a bearer access token (API v2) or with aff_id + aff_password (API v1).
Example request:
curl --request GET \
--get "http://localhost:8003/api/v2/status?aff_id=123&aff_password=12345678GH&startDate=2023-01-01&finishDate=2023-02-01&page=11&per_page=4" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8003/api/v2/status"
);
const params = {
"aff_id": "123",
"aff_password": "12345678GH",
"startDate": "2023-01-01",
"finishDate": "2023-02-01",
"page": "11",
"per_page": "4",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"current_page": 1,
"data": [
{
"aff_id": "123",
"lead_id": "XXXXXX",
"first_name": "Test",
"last_name": "Test",
"email": "test0@gmail.com",
"phone": "XXXXXXXXXXXXX",
"created_at": "2025-05-30T12:00:00.000000Z",
"status": "Not interested",
"deposit_date": "0"
}
],
"next_page_url": "https://sferanetwork.com/api/status?page=2",
"path": "https://sferanetwork.com/api/status",
"per_page": 500,
"prev_page_url": null,
"to": 500,
"total": 1100
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve deposits Endpoint for getting leads that ended up with deposits. Authenticate either with a bearer access token (API v2) or with aff_id + aff_password (API v1).
Example request:
curl --request GET \
--get "http://localhost:8003/api/v2/deposits?aff_id=123&aff_password=12345678&startDate=2023-01-01&finishDate=2023-12-01&page=11&per_page=6" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8003/api/v2/deposits"
);
const params = {
"aff_id": "123",
"aff_password": "12345678",
"startDate": "2023-01-01",
"finishDate": "2023-12-01",
"page": "11",
"per_page": "6",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"current_page": 1,
"data": [
{
"lead_id": "a91jsid7191jbc7s719a",
"deposit_date": "1970-02-01 00:00:01",
"amount": "1"
}
],
"next_page_url": "https://sferanetwork.com/api/deposits?page=2",
"path": "https://sferanetwork.com/api/deposits",
"per_page": 500,
"prev_page_url": null,
"to": 500,
"total": 1100
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Legacy API
These endpoints are deprecated. Support will end on 01.01.2027. Prefer /api/v2/.
Create lead Endpoint for creating a lead (your aff_id can be found on the main site, on the right side of the nav bar).
deprecated
Deprecated. This is a legacy /api/ endpoint. Support will end on 01.01.2027. Use /api/v2/ instead.
Example request:
curl --request POST \
"http://localhost:8003/api/leads?campaignID=aspernatur&firstName=Test&lastName=McTesty&email=example%40m.com&language=EN&country=US&referer=0&lander=0&phone_number=1234567890&phone_code=380&password=87654321&key=87654321&traffic_source=ABC123_AB_C&ip=145.12.5.13&affiliate=18&aff_id=provident&aff_password=2Wed%24Iof6327&landuuid=fb58156e-6a8b-39ca-82ab-4207cb770d60" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8003/api/leads"
);
const params = {
"campaignID": "aspernatur",
"firstName": "Test",
"lastName": "McTesty",
"email": "example@m.com",
"language": "EN",
"country": "US",
"referer": "0",
"lander": "0",
"phone_number": "1234567890",
"phone_code": "380",
"password": "87654321",
"key": "87654321",
"traffic_source": "ABC123_AB_C",
"ip": "145.12.5.13",
"affiliate": "18",
"aff_id": "provident",
"aff_password": "2Wed$Iof6327",
"landuuid": "fb58156e-6a8b-39ca-82ab-4207cb770d60",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Virtual endpoint to create a lead for test your settings Endpoint for creating a lead (It doesn't save any data just give you the response virtual data).
deprecated
Deprecated. This is a legacy /api/ endpoint. Support will end on 01.01.2027. Use /api/v2/ instead.
Example request:
curl --request POST \
"http://localhost:8003/api/leads/test?campaignID=sed&firstName=Test&lastName=McTesty&email=example%40m.com&language=EN&country=US&referer=0&lander=0&phone_number=1234567890&phone_code=380&password=87654321&key=87654321&traffic_source=ABC123_AB_C&ip=145.12.5.13&affiliate=12&aff_id=qui&aff_password=2Wed%24Iof6327&landuuid=f7700044-66fb-3273-a58f-b65e75593309" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8003/api/leads/test"
);
const params = {
"campaignID": "sed",
"firstName": "Test",
"lastName": "McTesty",
"email": "example@m.com",
"language": "EN",
"country": "US",
"referer": "0",
"lander": "0",
"phone_number": "1234567890",
"phone_code": "380",
"password": "87654321",
"key": "87654321",
"traffic_source": "ABC123_AB_C",
"ip": "145.12.5.13",
"affiliate": "12",
"aff_id": "qui",
"aff_password": "2Wed$Iof6327",
"landuuid": "f7700044-66fb-3273-a58f-b65e75593309",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200, Success):
{
"result": 200,
"success": true,
"data": {
"id": 457080,
"url": "https://www.source.com/?token=example"
},
"lead_id": 457080,
"email": "test-mail0684595@msn.com",
"url": "https://www.source.com/?token=example",
"autologin": "https://www.cloudflare.com/?token=example"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve lead statuses Endpoint for getting lead response statuses. Authenticate either with a bearer access token (API v2) or with aff_id + aff_password (API v1).
deprecated
Deprecated. This is a legacy /api/ endpoint. Support will end on 01.01.2027. Use /api/v2/ instead.
Example request:
curl --request GET \
--get "http://localhost:8003/api/status?aff_id=123&aff_password=12345678GH&startDate=2023-01-01&finishDate=2023-02-01&page=17&per_page=12" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8003/api/status"
);
const params = {
"aff_id": "123",
"aff_password": "12345678GH",
"startDate": "2023-01-01",
"finishDate": "2023-02-01",
"page": "17",
"per_page": "12",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"current_page": 1,
"data": [
{
"aff_id": "123",
"lead_id": "XXXXXX",
"first_name": "Test",
"last_name": "Test",
"email": "test0@gmail.com",
"phone": "XXXXXXXXXXXXX",
"created_at": "2025-05-30T12:00:00.000000Z",
"status": "Not interested",
"deposit_date": "0"
}
],
"next_page_url": "https://sferanetwork.com/api/status?page=2",
"path": "https://sferanetwork.com/api/status",
"per_page": 500,
"prev_page_url": null,
"to": 500,
"total": 1100
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Retrieve deposits Endpoint for getting leads that ended up with deposits. Authenticate either with a bearer access token (API v2) or with aff_id + aff_password (API v1).
deprecated
Deprecated. This is a legacy /api/ endpoint. Support will end on 01.01.2027. Use /api/v2/ instead.
Example request:
curl --request GET \
--get "http://localhost:8003/api/deposits?aff_id=123&aff_password=12345678&startDate=2023-01-01&finishDate=2023-12-01&page=3&per_page=16" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"http://localhost:8003/api/deposits"
);
const params = {
"aff_id": "123",
"aff_password": "12345678",
"startDate": "2023-01-01",
"finishDate": "2023-12-01",
"page": "3",
"per_page": "16",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"current_page": 1,
"data": [
{
"lead_id": "a91jsid7191jbc7s719a",
"deposit_date": "1970-02-01 00:00:01",
"amount": "1"
}
],
"next_page_url": "https://sferanetwork.com/api/deposits?page=2",
"path": "https://sferanetwork.com/api/deposits",
"per_page": 500,
"prev_page_url": null,
"to": 500,
"total": 1100
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.