Change residential sub-user traffic
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");curl_easy_setopt(hnd, CURLOPT_URL, "https://api.ltesocks.io/v2/proxies/residential/subusers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/traffic/add");
struct curl_slist *headers = NULL;headers = curl_slist_append(headers, "Idempotency-Key: example");headers = curl_slist_append(headers, "Authorization: Bearer <token>");headers = curl_slist_append(headers, "Content-Type: application/json");curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{ \"traffic_bytes\": 10737418 }");
CURLcode ret = curl_easy_perform(hnd);using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://api.ltesocks.io/v2/proxies/residential/subusers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/traffic/add"), Headers = { { "Idempotency-Key", "example" }, { "Authorization", "Bearer <token>" }, }, Content = new StringContent("{ \"traffic_bytes\": 10737418 }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://api.ltesocks.io/v2/proxies/residential/subusers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/traffic/add"
payload := strings.NewReader("{ \"traffic_bytes\": 10737418 }")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "example") 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(res) fmt.Println(string(body))
}HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.ltesocks.io/v2/proxies/residential/subusers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/traffic/add")) .header("Idempotency-Key", "example") .header("Authorization", "Bearer <token>") .header("Content-Type", "application/json") .method("POST", HttpRequest.BodyPublishers.ofString("{ \"traffic_bytes\": 10737418 }")) .build();HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());System.out.println(response.body());OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");RequestBody body = RequestBody.create(mediaType, "{ \"traffic_bytes\": 10737418 }");Request request = new Request.Builder() .url("https://api.ltesocks.io/v2/proxies/residential/subusers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/traffic/add") .post(body) .addHeader("Idempotency-Key", "example") .addHeader("Authorization", "Bearer <token>") .addHeader("Content-Type", "application/json") .build();
Response response = client.newCall(request).execute();import axios from 'axios';
const options = { method: 'POST', url: 'https://api.ltesocks.io/v2/proxies/residential/subusers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/traffic/add', headers: { 'Idempotency-Key': 'example', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, data: {traffic_bytes: 10737418}};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}const url = 'https://api.ltesocks.io/v2/proxies/residential/subusers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/traffic/add';const options = { method: 'POST', headers: { 'Idempotency-Key': 'example', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"traffic_bytes":10737418}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")val body = RequestBody.create(mediaType, "{ \"traffic_bytes\": 10737418 }")val request = Request.Builder() .url("https://api.ltesocks.io/v2/proxies/residential/subusers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/traffic/add") .post(body) .addHeader("Idempotency-Key", "example") .addHeader("Authorization", "Bearer <token>") .addHeader("Content-Type", "application/json") .build()
val response = client.newCall(request).execute()use serde_json::json;use reqwest;
#[tokio::main]pub async fn main() { let url = "https://api.ltesocks.io/v2/proxies/residential/subusers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/traffic/add";
let payload = json!({"traffic_bytes": 10737418});
let mut headers = reqwest::header::HeaderMap::new(); headers.insert("Idempotency-Key", "example".parse().unwrap()); headers.insert("Authorization", "Bearer <token>".parse().unwrap()); headers.insert("Content-Type", "application/json".parse().unwrap());
let client = reqwest::Client::new(); let response = client.post(url) .headers(headers) .json(&payload) .send() .await;
let results = response.unwrap() .json::<serde_json::Value>() .await .unwrap();
dbg!(results);}curl --request POST \ --url https://api.ltesocks.io/v2/proxies/residential/subusers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/traffic/add \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: example' \ --data '{ "traffic_bytes": 10737418 }'wget --quiet \ --method POST \ --header 'Idempotency-Key: example' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --body-data '{ "traffic_bytes": 10737418 }' \ --output-document \ - https://api.ltesocks.io/v2/proxies/residential/subusers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/traffic/addRequires an active linked top-level Master or Regular account and enabled residential sub-user management. Slave accounts cannot manage children. Send Authorization: Bearer
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”LTESocks UUID of a sub-user belonging to the authenticated parent.
Traffic operation.
Header Parameters
Section titled “Header Parameters”Key identifying this mutation. Use a new key for a new operation and reuse the same key and payload when retrying. A UUID is recommended; the API accepts any non-empty string up to 255 characters.
Request Body
Section titled “Request Body”For add and subtract, traffic_bytes is required. For reset, omit the body or send an empty object; the amount is not used.
object
Required for add/subtract. The total allocated quota after add cannot exceed 109951162777600 bytes; subtract cannot exceed the remaining traffic.
Example
10737418Responses
Section titled “Responses”Change residential sub-user traffic succeeded.
object
object
LTESocks child UUID used in management URLs.
Allocated quota in bytes.
Consumed traffic in bytes.
Remaining traffic in bytes.
Creation timestamp.
Examples
{ "success": true, "code": 200, "data": { "id": "11111111-1111-4111-8111-111111111111", "login": "parent_customer01", "email": "parent_customer01@example.test", "first_name": null, "last_name": null, "status": "active", "package_id": "22222222-2222-4222-8222-222222222222", "traffic_bytes": 1073741824, "used_bytes": 0, "remaining_bytes": 1073741824, "allowed_ips": [], "blocked_domains": [], "created_at": "2026-10-21T12:00:00Z" }}Missing or invalid bearer token.
object
Field validation errors, when available.
object
Example
{ "success": false, "code": 422, "message": "Data amount must be greater than zero."}Inactive or unsupported account, insufficient token ability, or child ownership denied.
object
Field validation errors, when available.
object
Example
{ "success": false, "code": 422, "message": "Data amount must be greater than zero."}Sub-user or linked residential account not found, or residential sub-user management is disabled.
object
Field validation errors, when available.
object
Example
{ "success": false, "code": 422, "message": "Data amount must be greater than zero."}Conflicting operation or duplicate user.
object
Field validation errors, when available.
object
Example
{ "success": false, "code": 422, "message": "Data amount must be greater than zero."}Invalid input, insufficient available traffic, incompatible package, or quota limit exceeded.
object
Field validation errors, when available.
object
Example
{ "success": false, "code": 422, "message": "Data amount must be greater than zero."}Request rate limit exceeded.
object
Field validation errors, when available.
object
Example
{ "success": false, "code": 422, "message": "Data amount must be greater than zero."}Internal service error.
object
Field validation errors, when available.
object
Example
{ "success": false, "code": 422, "message": "Data amount must be greater than zero."}Residential service failed or its result could not be read.
object
Field validation errors, when available.
object
Example
{ "success": false, "code": 422, "message": "Data amount must be greater than zero."}Residential service temporarily unavailable.
object
Field validation errors, when available.
object
Example
{ "success": false, "code": 422, "message": "Data amount must be greater than zero."}