Get credits burned for proxy usage
curl --request POST \
--url https://api.platform.soax.com/v1/proxy/analytics/credits-burned \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from_date": "2026-08-01T00:00:00Z",
"to_date": "2026-08-03T23:59:59Z"
}
'import requests
url = "https://api.platform.soax.com/v1/proxy/analytics/credits-burned"
payload = {
"from_date": "2026-08-01T00:00:00Z",
"to_date": "2026-08-03T23:59:59Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({from_date: '2026-08-01T00:00:00Z', to_date: '2026-08-03T23:59:59Z'})
};
fetch('https://api.platform.soax.com/v1/proxy/analytics/credits-burned', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.platform.soax.com/v1/proxy/analytics/credits-burned",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'from_date' => '2026-08-01T00:00:00Z',
'to_date' => '2026-08-03T23:59:59Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.platform.soax.com/v1/proxy/analytics/credits-burned"
payload := strings.NewReader("{\n \"from_date\": \"2026-08-01T00:00:00Z\",\n \"to_date\": \"2026-08-03T23:59:59Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.platform.soax.com/v1/proxy/analytics/credits-burned")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"from_date\": \"2026-08-01T00:00:00Z\",\n \"to_date\": \"2026-08-03T23:59:59Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.platform.soax.com/v1/proxy/analytics/credits-burned")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"from_date\": \"2026-08-01T00:00:00Z\",\n \"to_date\": \"2026-08-03T23:59:59Z\"\n}"
response = http.request(request)
puts response.read_body[
{
"date": "2026-08-01",
"data": [
{
"key": "1",
"value": 100
},
{
"key": "2",
"value": 20.5
}
]
},
{
"date": "2026-08-02",
"data": [
{
"key": "1",
"value": 84.2
},
{
"key": "2",
"value": 31
}
]
},
{
"date": "2026-08-03",
"data": [
{
"key": "1",
"value": 91.7
}
]
}
]{
"error": "Date range cannot be more than 1 year"
}{
"detail": "Invalid API key"
}{
"detail": "Missing required scope: proxy:packages:read"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"error": "Rate limit exceeded: 5 per 1 second"
}Analytics
Credits burned
Retrieve credits burned per day, broken down by tier. Each item holds one date and a data array whose key is the tier number ("1", "2", "3") and whose value is the credits burned on that tier. The date range may span at most 365 days.
If the API key is restricted to specific packages, results (and any package_ids filter) are limited to those packages.
Requires the proxy:analytics:read scope.
POST
/
v1
/
proxy
/
analytics
/
credits-burned
Get credits burned for proxy usage
curl --request POST \
--url https://api.platform.soax.com/v1/proxy/analytics/credits-burned \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from_date": "2026-08-01T00:00:00Z",
"to_date": "2026-08-03T23:59:59Z"
}
'import requests
url = "https://api.platform.soax.com/v1/proxy/analytics/credits-burned"
payload = {
"from_date": "2026-08-01T00:00:00Z",
"to_date": "2026-08-03T23:59:59Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({from_date: '2026-08-01T00:00:00Z', to_date: '2026-08-03T23:59:59Z'})
};
fetch('https://api.platform.soax.com/v1/proxy/analytics/credits-burned', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.platform.soax.com/v1/proxy/analytics/credits-burned",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'from_date' => '2026-08-01T00:00:00Z',
'to_date' => '2026-08-03T23:59:59Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.platform.soax.com/v1/proxy/analytics/credits-burned"
payload := strings.NewReader("{\n \"from_date\": \"2026-08-01T00:00:00Z\",\n \"to_date\": \"2026-08-03T23:59:59Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.platform.soax.com/v1/proxy/analytics/credits-burned")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"from_date\": \"2026-08-01T00:00:00Z\",\n \"to_date\": \"2026-08-03T23:59:59Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.platform.soax.com/v1/proxy/analytics/credits-burned")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"from_date\": \"2026-08-01T00:00:00Z\",\n \"to_date\": \"2026-08-03T23:59:59Z\"\n}"
response = http.request(request)
puts response.read_body[
{
"date": "2026-08-01",
"data": [
{
"key": "1",
"value": 100
},
{
"key": "2",
"value": 20.5
}
]
},
{
"date": "2026-08-02",
"data": [
{
"key": "1",
"value": 84.2
},
{
"key": "2",
"value": 31
}
]
},
{
"date": "2026-08-03",
"data": [
{
"key": "1",
"value": 91.7
}
]
}
]{
"error": "Date range cannot be more than 1 year"
}{
"detail": "Invalid API key"
}{
"detail": "Missing required scope: proxy:packages:read"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"error": "Rate limit exceeded: 5 per 1 second"
}Authorizations
API key secret (starts with s_live_). Create keys in the dashboard under Settings → API keys, or via POST /v1/api-keys/. Send it as Authorization: Bearer <secret>.
Body
application/json
Was this page helpful?
⌘I