Change proxy protocol
curl --request POST \
--url https://api.proxyjam.com/public/v1/orders/{order_id}/protocol \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"new_type": "<string>"
}
'import requests
url = "https://api.proxyjam.com/public/v1/orders/{order_id}/protocol"
payload = { "new_type": "<string>" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({new_type: '<string>'})
};
fetch('https://api.proxyjam.com/public/v1/orders/{order_id}/protocol', 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.proxyjam.com/public/v1/orders/{order_id}/protocol",
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([
'new_type' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.proxyjam.com/public/v1/orders/{order_id}/protocol"
payload := strings.NewReader("{\n \"new_type\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.proxyjam.com/public/v1/orders/{order_id}/protocol")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"new_type\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.proxyjam.com/public/v1/orders/{order_id}/protocol")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"new_type\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyProxy management
Change proxy protocol
Switch a proxy between HTTP and SOCKS5 protocols.
POST
/
orders
/
{order_id}
/
protocol
Change proxy protocol
curl --request POST \
--url https://api.proxyjam.com/public/v1/orders/{order_id}/protocol \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"new_type": "<string>"
}
'import requests
url = "https://api.proxyjam.com/public/v1/orders/{order_id}/protocol"
payload = { "new_type": "<string>" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({new_type: '<string>'})
};
fetch('https://api.proxyjam.com/public/v1/orders/{order_id}/protocol', 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.proxyjam.com/public/v1/orders/{order_id}/protocol",
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([
'new_type' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.proxyjam.com/public/v1/orders/{order_id}/protocol"
payload := strings.NewReader("{\n \"new_type\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.proxyjam.com/public/v1/orders/{order_id}/protocol")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"new_type\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.proxyjam.com/public/v1/orders/{order_id}/protocol")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"new_type\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyChanges the protocol of a provisioned proxy by calling the upstream provider. After the switch, the local record is updated to reflect the new protocol, port, and credentials returned by the provider.
Path parameters
string
required
UUID of the order.
Body
string
required
Target protocol. Must be one of
HTTP or SOCKS5.Response
Updated proxy object after the protocol change. Same shape as themanaged_proxy object in Get order.
This endpoint makes a live call to the upstream provider. The proxy may briefly be unavailable during the protocol switch.
Example
curl -X POST "https://api.proxyjam.com/public/v1/orders/997b4450-e7ae-4ad9-8a25-996e582049c9/protocol" \
-H "X-API-Key: pj_AbCdEf..." \
-H "Content-Type: application/json" \
-d '{"new_type": "SOCKS5"}'
from proxyjam import ProxyJamClient
with ProxyJamClient(api_key="pj_live_...") as proxyjam:
proxy = proxyjam.proxies.change_protocol(
"997b4450-e7ae-4ad9-8a25-996e582049c9",
"SOCKS5",
)
print(proxy.protocol, proxy.port)
{
"order_id": "997b4450-e7ae-4ad9-8a25-996e582049c9",
"provider_proxy_id": "1836367",
"provider_order_id": "019c8094-c196-7b71-852f-4e5e2e2fceff",
"host": "92.113.88.106",
"port": 42416,
"username": "<proxy-username>",
"password": "<proxy-password>",
"protocol": "SOCKS5",
"status": "active",
"expires_at": "2026-03-21T14:22:39Z",
"auto_renew": true,
"whitelisted_ips": [],
"bandwidth_total_gb": 1.0,
"bandwidth_used_gb": 0.1
}
⌘I