Format targeted connections from a special session list
POST
/account/api/v1/residential/sessions/exportAuthorization
| Authorization | Bearer YOUR_ARNPROXY_API_KEY |
|---|---|
| Required permission | credentials |
| Accept | application/json |
| Content-Type | application/json |
Parameters
| Name | Type | Description |
|---|---|---|
list_id | integer | Owned ARNPROXY connection-list record ID, not the supplier list ID. |
country | string | Two uppercase country-code letters, e.g. US. |
subdivision | integer | Positive subdivision code; requires country. |
city | string | Requires country; at most 80 bytes of letters/digits separated by single spaces/hyphens. |
isp_id | integer | ID from residential_isp_codes; 1–2147483647. |
asn | integer | ASN between 1 and 4294967295. |
zip | string | 1–16 letters/digits/hyphens; requires country. |
session | string | 1–64 ASCII letters/digits. |
ttl | string | Positive number+s/m/h, e.g. 15m, at most 86400 seconds; requires session. |
format | string | uri | host_port_user_pass | user_pass_host_port. Credential-bearing formats need credentials permission. Also supports csv | custom. Default: "uri" |
protocol | string | http or socks5; controls the prefix only for uri output. Default: "http" |
offset | integer | 0–999, below the port count. Default: 0 |
limit | integer | 1–1000; default 10. Default: 10 |
columns | string[] | CSV only: id, endpoint, ip, port, login, password. Default ["id","endpoint"]. Login/password require credentials permission. |
template | string | Required for custom, at most 200 characters. %endpoint%, %ip%, %port%, %id%, %login%, %username%, %password%, %login_url%, %password_url%. Control characters and unknown placeholders are rejected. |
Request body
Replace YOUR_/FROM_ placeholders with values from the relevant catalog, quote or scope. Examples leave consent false; only approve a real operation intentionally.
{
"list_id": "YOUR_SPECIAL_LIST_ID",
"session": "Example001",
"ttl": "15m",
"format": "uri",
"limit": 1
}Request example
printf 'Authorization: Bearer %s\n' "$ARNPROXY_API_KEY" |
curl --silent --show-error --header @- \
--header 'Accept: application/json' \
--connect-timeout 10 --max-time 30 \
--request POST --header 'Content-Type: application/json' \
--data-binary @request.json \
'https://www.arnproxy.com/account/api/v1/residential/sessions/export'Examples are not executed on this page. Keep the API key in a server-side environment variable; do not put real keys in URLs or browser code. Prepare request.json for POST examples.
{"curl":"printf \u0027Authorization: Bearer %s\\n\u0027 \u0022$ARNPROXY_API_KEY\u0022 |\n curl --silent --show-error --header @- \\\n --header \u0027Accept: application\/json\u0027 \\\n --connect-timeout 10 --max-time 30 \\\n --request POST --header \u0027Content-Type: application\/json\u0027 \\\n --data-binary @request.json \\\n \u0027https:\/\/www.arnproxy.com\/account\/api\/v1\/residential\/sessions\/export\u0027","python":"import os, requests\n\nheaders = {\u0022Authorization\u0022: \u0022Bearer \u0022 + os.environ[\u0022ARNPROXY_API_KEY\u0022]}\nimport json\nwith open(\u0022request.json\u0022, encoding=\u0022utf-8\u0022) as f:\n payload = json.load(f)\nresponse = requests.post(\n \u0022https:\/\/www.arnproxy.com\/account\/api\/v1\/residential\/sessions\/export\u0022,\n headers=headers, json=payload,\n timeout=(10, 30), allow_redirects=False\n)\nprint(response.status_code, response.text)\n# No automatic write retry.","javascript":"const headers = { Authorization: `Bearer ${process.env.ARNPROXY_API_KEY}` };\nconst { readFile } = await import(\u0027node:fs\/promises\u0027);\nheaders[\u0027Content-Type\u0027] = \u0027application\/json\u0027;\nconst body = await readFile(\u0027request.json\u0027, \u0027utf8\u0027);\nconst response = await fetch(\u0022https:\/\/www.arnproxy.com\/account\/api\/v1\/residential\/sessions\/export\u0022, {\n method: \u0027POST\u0027, headers, redirect: \u0027error\u0027,\n signal: AbortSignal.timeout(30000), body\n});\nconsole.log(response.status, await response.text());\n\/\/ A write timeout is ambiguous; query its saved operation.","php":"\u003C?php\n$headers = [\u0027Accept: application\/json\u0027,\n \u0027Authorization: Bearer \u0027.getenv(\u0027ARNPROXY_API_KEY\u0027)];\n$headers[] = \u0027Content-Type: application\/json\u0027;\n$ch = curl_init(\u0027https:\/\/www.arnproxy.com\/account\/api\/v1\/residential\/sessions\/export\u0027);\ncurl_setopt_array($ch, [\n CURLOPT_RETURNTRANSFER =\u003E true,\n CURLOPT_HTTPHEADER =\u003E $headers,\n CURLOPT_FOLLOWLOCATION =\u003E false,\n CURLOPT_SSL_VERIFYPEER =\u003E true, CURLOPT_SSL_VERIFYHOST =\u003E 2,\n CURLOPT_CONNECTTIMEOUT =\u003E 10, CURLOPT_TIMEOUT =\u003E 30,\n CURLOPT_POST =\u003E true,\n CURLOPT_POSTFIELDS =\u003E file_get_contents(\u0027request.json\u0027),\n]);\n$result = curl_exec($ch);\nif ($result === false) {\n \/\/ Do not repeat a write; use the original operation key.\n throw new RuntimeException(\u0027Transport result unknown\u0027);\n}\necho curl_getinfo($ch, CURLINFO_HTTP_CODE).PHP_EOL.$result;\ncurl_close($ch);","go":"package main\n\nimport (\n \u0022fmt\u0022\n \u0022io\u0022\n \u0022net\/http\u0022\n \u0022os\u0022\n \u0022time\u0022\n)\n\nfunc main() {\n client := \u0026http.Client{Timeout: 30*time.Second,\n CheckRedirect: func(req *http.Request, via []*http.Request) error {\n return http.ErrUseLastResponse\n }}\n var body io.Reader\n file, err := os.Open(\u0022request.json\u0022); if err != nil { panic(err) }\n defer file.Close(); body = file\n req, err := http.NewRequest(\u0022POST\u0022, \u0022https:\/\/www.arnproxy.com\/account\/api\/v1\/residential\/sessions\/export\u0022, body)\n if err != nil { panic(err) }\n req.Header.Set(\u0022Authorization\u0022, \u0022Bearer \u0022+os.Getenv(\u0022ARNPROXY_API_KEY\u0022))\n req.Header.Set(\u0022Content-Type\u0022, \u0022application\/json\u0022)\n res, err := client.Do(req); if err != nil { panic(err) }\n defer res.Body.Close()\n data, err := io.ReadAll(res.Body); if err != nil { panic(err) }\n fmt.Println(res.StatusCode, string(data))\n}","csharp":"using System;\nusing System.IO;\nusing System.Net.Http;\nusing System.Net.Http.Headers;\nusing System.Text;\n\nusing var handler = new HttpClientHandler { AllowAutoRedirect = false };\nusing var client = new HttpClient(handler) { Timeout = TimeSpan.FromSeconds(30) };\nusing var request = new HttpRequestMessage(HttpMethod.Post,\n \u0022https:\/\/www.arnproxy.com\/account\/api\/v1\/residential\/sessions\/export\u0022);\nrequest.Headers.Authorization = new AuthenticationHeaderValue(\n \u0022Bearer\u0022, Environment.GetEnvironmentVariable(\u0022ARNPROXY_API_KEY\u0022));\nrequest.Content = new StringContent(\n await File.ReadAllTextAsync(\u0022request.json\u0022), Encoding.UTF8, \u0022application\/json\u0022);\nusing var response = await client.SendAsync(request);\nConsole.WriteLine((int)response.StatusCode);\nConsole.WriteLine(await response.Content.ReadAsStringAsync());\n\/\/ Never automatically retry an ambiguous write.","java":"import java.net.URI;\nimport java.net.http.*;\nimport java.nio.charset.StandardCharsets;\nimport java.nio.file.*;\n\n\/\/ Inside your application method:\nvar client = HttpClient.newHttpClient();\nvar request = HttpRequest.newBuilder(URI.create(\u0022https:\/\/www.arnproxy.com\/account\/api\/v1\/residential\/sessions\/export\u0022))\n .header(\u0022Authorization\u0022, \u0022Bearer \u0022 + System.getenv(\u0022ARNPROXY_API_KEY\u0022))\n .header(\u0022Accept\u0022, \u0022application\/json\u0022)\n .header(\u0022Content-Type\u0022, \u0022application\/json\u0022)\n .POST(HttpRequest.BodyPublishers.ofString(\n Files.readString(Path.of(\u0022request.json\u0022), StandardCharsets.UTF_8)))\n .build();\nvar response = client.send(request, HttpResponse.BodyHandlers.ofString());\nSystem.out.println(response.statusCode());"}Responses
200Success response
{
"ok": true,
"data": {
"list_id": 30002,
"package_id": 20001,
"format": "uri",
"protocol": "http",
"items": [
"http://ExampleUser_s_Example001_ttl_15m:ExamplePassword@res.arnproxy.com:10000"
],
"count": 1,
"next_offset": 1,
"session": "Example001",
"ttl": "15m",
"credentials_included": true,
"provider_requests": 0,
"database_changes": 0,
"proxy_connections_tested": false,
"connection_success_guaranteed": false,
"snapshot": {
"source": "arnproxy_records",
"observed_at": "2030-01-01T12:00:00+00:00",
"fresh": true,
"max_age_seconds": 3600,
"reason": null
},
"source": "arnproxy_records"
},
"meta": {
"request_id": "000000000000000000000001",
"phase": "public_v1",
"source": "arnproxy_records"
}
}Response fields and types
| Name | Type | Description |
|---|---|---|
ok | boolean | Success envelope flag; on false inspect error.code. |
data | object | Operation-specific result; examples are illustrative and synthetic. |
data.list_id | integer | Relevant ARNPROXY record ID; use it instead of the upstream internal ID. |
data.package_id | integer | Relevant ARNPROXY record ID; use it instead of the upstream internal ID. |
data.format | string | Operation-specific format value; preserve its demonstrated type and consult the behavior notes. |
data.protocol | string | Operation-specific protocol value; preserve its demonstrated type and consult the behavior notes. |
data.items | array | Records on this page or formatted connection strings; an empty list can be valid. |
data.items[] | string | Records on this page or formatted connection strings; an empty list can be valid. |
data.count | integer | Number of records visible in this result or generated connection strings. |
data.next_offset | integer | Next connection-output offset, or null when complete. |
data.session | string | Operation-specific session value; preserve its demonstrated type and consult the behavior notes. |
data.ttl | string | Operation-specific ttl value; preserve its demonstrated type and consult the behavior notes. |
data.credentials_included | boolean | Whether this result/key includes or permits sensitive credentials. |
data.provider_requests | integer | Operation-specific provider requests value; preserve its demonstrated type and consult the behavior notes. |
data.database_changes | integer | Operation-specific database changes value; preserve its demonstrated type and consult the behavior notes. |
data.proxy_connections_tested | boolean | Operation-specific proxy connections tested value; preserve its demonstrated type and consult the behavior notes. |
data.connection_success_guaranteed | boolean | Operation-specific connection success guaranteed value; preserve its demonstrated type and consult the behavior notes. |
data.snapshot | object | Package snapshot origin/time/freshness; stale snapshots do not grant management access. |
data.snapshot.source | string | Data source; local records and a live provider lookup are different evidence. |
data.snapshot.observed_at | string | Timestamp in the API’s returned representation; example dates are synthetic. |
data.snapshot.fresh | boolean | Whether the observation satisfies its freshness window. |
data.snapshot.max_age_seconds | integer | Maximum snapshot age allowed for freshness, in seconds. |
data.snapshot.reason | string|null | Fixed reason code or null, never raw provider error text. |
data.source | string | Data source; local records and a live provider lookup are different evidence. |
meta | object | Request correlation and data-source metadata. |
meta.request_id | string | This HTTP request’s correlation ID, not an operation key or order ID. |
meta.phase | string | Operation-specific phase value; preserve its demonstrated type and consult the behavior notes. |
meta.source | string | Data source; local records and a live provider lookup are different evidence. |
Error response
{
"ok": false,
"error": { "code": "INVALID_API_KEY" },
"meta": { "request_id": "000000000000000000000001" }
}Authentication and validation may reject a request before execution. Consult the error reference and retain request_id when contacting support. Never send keys or passwords. Errors & limits →
Behavior & important notes
- Package and list IDs are ARNPROXY record IDs, not upstream package keys or list IDs. A stale package snapshot cannot grant access; refresh it with residential_package_refresh when needed.
- Session suffixes require a separately provisioned and verified special list. TTL requires a 1–64 letter/digit session. Positive s/m/h durations are limited to 24 hours. Formatting does not connect; actual use consumes traffic.
- Credential-bearing output requires credentials permission. Never log or send returned connection strings, passwords or Authorization headers to support.