Delete stateful sessions in bulk
curl --request POST \
--url https://api.platform.soax.com/v1/proxy/packages/{package_id}/stateful-sessions/delete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
"7c1e9a52-3b4d-4f6a-9e8b-2d5c0a1f6b3e",
"0f4b2c71-9a8d-4e6f-b1c3-5d7e9f0a2b4c"
]
}
'import requests
url = "https://api.platform.soax.com/v1/proxy/packages/{package_id}/stateful-sessions/delete"
payload = { "ids": ["7c1e9a52-3b4d-4f6a-9e8b-2d5c0a1f6b3e", "0f4b2c71-9a8d-4e6f-b1c3-5d7e9f0a2b4c"] }
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({
ids: ['7c1e9a52-3b4d-4f6a-9e8b-2d5c0a1f6b3e', '0f4b2c71-9a8d-4e6f-b1c3-5d7e9f0a2b4c']
})
};
fetch('https://api.platform.soax.com/v1/proxy/packages/{package_id}/stateful-sessions/delete', 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/packages/{package_id}/stateful-sessions/delete",
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([
'ids' => [
'7c1e9a52-3b4d-4f6a-9e8b-2d5c0a1f6b3e',
'0f4b2c71-9a8d-4e6f-b1c3-5d7e9f0a2b4c'
]
]),
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/packages/{package_id}/stateful-sessions/delete"
payload := strings.NewReader("{\n \"ids\": [\n \"7c1e9a52-3b4d-4f6a-9e8b-2d5c0a1f6b3e\",\n \"0f4b2c71-9a8d-4e6f-b1c3-5d7e9f0a2b4c\"\n ]\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/packages/{package_id}/stateful-sessions/delete")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"7c1e9a52-3b4d-4f6a-9e8b-2d5c0a1f6b3e\",\n \"0f4b2c71-9a8d-4e6f-b1c3-5d7e9f0a2b4c\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.platform.soax.com/v1/proxy/packages/{package_id}/stateful-sessions/delete")
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 \"ids\": [\n \"7c1e9a52-3b4d-4f6a-9e8b-2d5c0a1f6b3e\",\n \"0f4b2c71-9a8d-4e6f-b1c3-5d7e9f0a2b4c\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"detail": "Invalid API key"
}{
"detail": "Missing required scope: proxy:packages:write"
}{
"detail": "Package not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"error": "Rate limit exceeded: 5 per 1 second"
}Stateful Sessions
Delete stateful sessions in bulk
Delete up to 100 sessions on a package in one call. ids must be session UUIDs.
Requires the proxy:packages:write scope.
POST
/
v1
/
proxy
/
packages
/
{package_id}
/
stateful-sessions
/
delete
Delete stateful sessions in bulk
curl --request POST \
--url https://api.platform.soax.com/v1/proxy/packages/{package_id}/stateful-sessions/delete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
"7c1e9a52-3b4d-4f6a-9e8b-2d5c0a1f6b3e",
"0f4b2c71-9a8d-4e6f-b1c3-5d7e9f0a2b4c"
]
}
'import requests
url = "https://api.platform.soax.com/v1/proxy/packages/{package_id}/stateful-sessions/delete"
payload = { "ids": ["7c1e9a52-3b4d-4f6a-9e8b-2d5c0a1f6b3e", "0f4b2c71-9a8d-4e6f-b1c3-5d7e9f0a2b4c"] }
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({
ids: ['7c1e9a52-3b4d-4f6a-9e8b-2d5c0a1f6b3e', '0f4b2c71-9a8d-4e6f-b1c3-5d7e9f0a2b4c']
})
};
fetch('https://api.platform.soax.com/v1/proxy/packages/{package_id}/stateful-sessions/delete', 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/packages/{package_id}/stateful-sessions/delete",
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([
'ids' => [
'7c1e9a52-3b4d-4f6a-9e8b-2d5c0a1f6b3e',
'0f4b2c71-9a8d-4e6f-b1c3-5d7e9f0a2b4c'
]
]),
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/packages/{package_id}/stateful-sessions/delete"
payload := strings.NewReader("{\n \"ids\": [\n \"7c1e9a52-3b4d-4f6a-9e8b-2d5c0a1f6b3e\",\n \"0f4b2c71-9a8d-4e6f-b1c3-5d7e9f0a2b4c\"\n ]\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/packages/{package_id}/stateful-sessions/delete")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"7c1e9a52-3b4d-4f6a-9e8b-2d5c0a1f6b3e\",\n \"0f4b2c71-9a8d-4e6f-b1c3-5d7e9f0a2b4c\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.platform.soax.com/v1/proxy/packages/{package_id}/stateful-sessions/delete")
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 \"ids\": [\n \"7c1e9a52-3b4d-4f6a-9e8b-2d5c0a1f6b3e\",\n \"0f4b2c71-9a8d-4e6f-b1c3-5d7e9f0a2b4c\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"detail": "Invalid API key"
}{
"detail": "Missing required scope: proxy:packages:write"
}{
"detail": "Package not found"
}{
"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>.
Path Parameters
The ID of the proxy package (UUID format)
Pattern:
^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$Body
application/json
Session UUIDs to delete, up to 100.
Maximum array length:
100Response
Successful Response
Was this page helpful?