Create a residential sub-user
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");
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, "{ \"login\": \"customer01\", \"traffic_bytes\": 10737418, \"package_id\": \"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0\" }");
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"), Headers = { { "Idempotency-Key", "example" }, { "Authorization", "Bearer <token>" }, }, Content = new StringContent("{ \"login\": \"customer01\", \"traffic_bytes\": 10737418, \"package_id\": \"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0\" }") { 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"
payload := strings.NewReader("{ \"login\": \"customer01\", \"traffic_bytes\": 10737418, \"package_id\": \"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0\" }")
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")) .header("Idempotency-Key", "example") .header("Authorization", "Bearer <token>") .header("Content-Type", "application/json") .method("POST", HttpRequest.BodyPublishers.ofString("{ \"login\": \"customer01\", \"traffic_bytes\": 10737418, \"package_id\": \"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0\" }")) .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, "{ \"login\": \"customer01\", \"traffic_bytes\": 10737418, \"package_id\": \"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0\" }");Request request = new Request.Builder() .url("https://api.ltesocks.io/v2/proxies/residential/subusers") .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', headers: { 'Idempotency-Key': 'example', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, data: { login: 'customer01', traffic_bytes: 10737418, package_id: '2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' }};
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';const options = { method: 'POST', headers: { 'Idempotency-Key': 'example', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"login":"customer01","traffic_bytes":10737418,"package_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
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, "{ \"login\": \"customer01\", \"traffic_bytes\": 10737418, \"package_id\": \"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0\" }")val request = Request.Builder() .url("https://api.ltesocks.io/v2/proxies/residential/subusers") .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";
let payload = json!({ "login": "customer01", "traffic_bytes": 10737418, "package_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" });
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 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: example' \ --data '{ "login": "customer01", "traffic_bytes": 10737418, "package_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'wget --quiet \ --method POST \ --header 'Idempotency-Key: example' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --body-data '{ "login": "customer01", "traffic_bytes": 10737418, "package_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }' \ --output-document \ - https://api.ltesocks.io/v2/proxies/residential/subusersRequires 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”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 Bodyrequired
Section titled “Request Bodyrequired”Only a login suffix and initial traffic are required. Do not send email, first_name or last_name; supplying any of these fields is rejected. The parent comes from the bearer token.
object
Login suffix. The full login is {parent_login}_{login}; email is generated automatically.
Example
customer01Positive initial allocation in bytes. 10737418 bytes is approximately 0.01 GiB. The quota limit is 100 TiB (labelled 100 TB in the panels).
Example
10737418Optional configured residential package UUID. Omit or send null to use the active package. A different package is rejected.
Responses
Section titled “Responses”Create a residential sub-user 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": 201, "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."}