Proxy Presets API

Save and manage proxy configuration presets. Presets let you store reusable proxy settings — such as country, connection type, and session type — so you can quickly apply them when creating or updating sub-users without repeating the same configuration each time.

GET /v1/proxy-presets Requires Auth

List Presets

List Presets

Retrieve all proxy configuration presets associated with the authenticated account. Returns an array of preset objects including their name, saved configuration, and creation timestamp.

curl https://api.proxyhat.com/v1/proxy-presets \
  -H "Authorization: Bearer __API_KEY__" \
  -H "Accept: application/json"
import requests

response = requests.get(
    "https://api.proxyhat.com/v1/proxy-presets",
    headers={
        "Authorization": "Bearer __API_KEY__",
        "Accept": "application/json",
    },
)

presets = response.json()["payload"]
for preset in presets:
    print(f"{preset[\"name\"]} — {preset[\"config\"]}")
const response = await fetch("https://api.proxyhat.com/v1/proxy-presets", {
  headers: {
    "Authorization": "Bearer __API_KEY__",
    "Accept": "application/json",
  },
});

const { payload: presets } = await response.json();
presets.forEach(p => console.log(`${p.name} — ${JSON.stringify(p.config)}`));
req, _ := http.NewRequest("GET", "https://api.proxyhat.com/v1/proxy-presets", nil)
req.Header.Set("Authorization", "Bearer __API_KEY__")
req.Header.Set("Accept", "application/json")

resp, err := http.DefaultClient.Do(req)
if err != nil {
    log.Fatal(err)
}
defer resp.Body.Close()

var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Println(result["payload"])
Response 200
{
  "success": true,
  "payload": [
    {
      "id": 1,
      "name": "US Residential",
      "config": {
        "country": "US",
        "connection_type": "residential",
        "session_type": "rotating"
      },
      "created_at": "2026-01-20T10:00:00Z"
    }
  ]
}
POST /v1/proxy-presets Requires Auth

Create Preset

Create Preset

Create a new proxy configuration preset. Provide a descriptive name and a config object containing the proxy settings you want to save for reuse.

Request Body
Name Type Required Description
name string Required A descriptive name for the preset (e.g. "US Residential", "EU Mobile Sticky").
config object Required The proxy configuration to save. Can include keys such as country, connection_type, session_type, and any other proxy settings.
curl -X POST https://api.proxyhat.com/v1/proxy-presets \
  -H "Authorization: Bearer __API_KEY__" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "name": "US Residential",
    "config": {
      "country": "US",
      "connection_type": "residential"
    }
  }'
import requests

response = requests.post(
    "https://api.proxyhat.com/v1/proxy-presets",
    headers={
        "Authorization": "Bearer __API_KEY__",
        "Content-Type": "application/json",
        "Accept": "application/json",
    },
    json={
        "name": "US Residential",
        "config": {
            "country": "US",
            "connection_type": "residential",
        },
    },
)

preset = response.json()["payload"]
print(f"Created: {preset[\"name\"]} (ID: {preset[\"id\"]})")
const response = await fetch("https://api.proxyhat.com/v1/proxy-presets", {
  method: "POST",
  headers: {
    "Authorization": "Bearer __API_KEY__",
    "Content-Type": "application/json",
    "Accept": "application/json",
  },
  body: JSON.stringify({
    name: "US Residential",
    config: {
      country: "US",
      connection_type: "residential",
    },
  }),
});

const { payload: preset } = await response.json();
console.log(`Created: ${preset.name} (ID: ${preset.id})`);
payload := strings.NewReader(`{
  "name": "US Residential",
  "config": {
    "country": "US",
    "connection_type": "residential"
  }
}`)

req, _ := http.NewRequest("POST", "https://api.proxyhat.com/v1/proxy-presets", payload)
req.Header.Set("Authorization", "Bearer __API_KEY__")
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Accept", "application/json")

resp, err := http.DefaultClient.Do(req)
if err != nil {
    log.Fatal(err)
}
defer resp.Body.Close()

var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Println(result["payload"])
Response 201
{
  "success": true,
  "payload": {
    "id": 2,
    "name": "US Residential",
    "config": {
      "country": "US",
      "connection_type": "residential"
    },
    "created_at": "2026-01-25T14:30:00Z"
  }
}
GET /v1/proxy-presets/{proxy_preset} Requires Auth

Get Preset

Get Preset

Retrieve a single proxy configuration preset by its ID. Returns the full preset object including its name, saved configuration, and creation timestamp.

Path Parameters
Name Type Required Description
proxy_preset integer Required The ID of the preset to retrieve.
curl https://api.proxyhat.com/v1/proxy-presets/1 \
  -H "Authorization: Bearer __API_KEY__" \
  -H "Accept: application/json"
import requests

preset_id = 1

response = requests.get(
    f"https://api.proxyhat.com/v1/proxy-presets/{preset_id}",
    headers={
        "Authorization": "Bearer __API_KEY__",
        "Accept": "application/json",
    },
)

preset = response.json()["payload"]
print(f"{preset[\"name\"]} — {preset[\"config\"]}")
const presetId = 1;

const response = await fetch(`https://api.proxyhat.com/v1/proxy-presets/${presetId}`, {
  headers: {
    "Authorization": "Bearer __API_KEY__",
    "Accept": "application/json",
  },
});

const { payload: preset } = await response.json();
console.log(`${preset.name} — ${JSON.stringify(preset.config)}`);
presetID := 1
url := fmt.Sprintf("https://api.proxyhat.com/v1/proxy-presets/%d", presetID)

req, _ := http.NewRequest("GET", url, nil)
req.Header.Set("Authorization", "Bearer __API_KEY__")
req.Header.Set("Accept", "application/json")

resp, err := http.DefaultClient.Do(req)
if err != nil {
    log.Fatal(err)
}
defer resp.Body.Close()

var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Println(result["payload"])
Response 200
{
  "success": true,
  "payload": {
    "id": 1,
    "name": "US Residential",
    "config": {
      "country": "US",
      "connection_type": "residential",
      "session_type": "rotating"
    },
    "created_at": "2026-01-20T10:00:00Z"
  }
}
PUT /v1/proxy-presets/{proxy_preset} Requires Auth

Update Preset

Update Preset

Update an existing proxy configuration preset. You can change the name, the config, or both. Only the fields you include in the request body will be updated.

Path Parameters
Name Type Required Description
proxy_preset integer Required The ID of the preset to update.
Request Body
Name Type Required Description
name string Optional A new descriptive name for the preset.
config object Optional Updated proxy configuration object. Replaces the entire config when provided.
curl -X PUT https://api.proxyhat.com/v1/proxy-presets/1 \
  -H "Authorization: Bearer __API_KEY__" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "name": "US Residential Rotating",
    "config": {
      "country": "US",
      "connection_type": "residential",
      "session_type": "rotating"
    }
  }'
import requests

preset_id = 1

response = requests.put(
    f"https://api.proxyhat.com/v1/proxy-presets/{preset_id}",
    headers={
        "Authorization": "Bearer __API_KEY__",
        "Content-Type": "application/json",
        "Accept": "application/json",
    },
    json={
        "name": "US Residential Rotating",
        "config": {
            "country": "US",
            "connection_type": "residential",
            "session_type": "rotating",
        },
    },
)

preset = response.json()["payload"]
print(f"Updated: {preset[\"name\"]}")
const presetId = 1;

const response = await fetch(`https://api.proxyhat.com/v1/proxy-presets/${presetId}`, {
  method: "PUT",
  headers: {
    "Authorization": "Bearer __API_KEY__",
    "Content-Type": "application/json",
    "Accept": "application/json",
  },
  body: JSON.stringify({
    name: "US Residential Rotating",
    config: {
      country: "US",
      connection_type: "residential",
      session_type: "rotating",
    },
  }),
});

const { payload: preset } = await response.json();
console.log(`Updated: ${preset.name}`);
presetID := 1
url := fmt.Sprintf("https://api.proxyhat.com/v1/proxy-presets/%d", presetID)

payload := strings.NewReader(`{
  "name": "US Residential Rotating",
  "config": {
    "country": "US",
    "connection_type": "residential",
    "session_type": "rotating"
  }
}`)

req, _ := http.NewRequest("PUT", url, payload)
req.Header.Set("Authorization", "Bearer __API_KEY__")
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Accept", "application/json")

resp, err := http.DefaultClient.Do(req)
if err != nil {
    log.Fatal(err)
}
defer resp.Body.Close()

var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Println(result["payload"])
Response 200
{
  "success": true,
  "payload": {
    "id": 1,
    "name": "US Residential Rotating",
    "config": {
      "country": "US",
      "connection_type": "residential",
      "session_type": "rotating"
    },
    "created_at": "2026-01-20T10:00:00Z"
  }
}
DELETE /v1/proxy-presets/{proxy_preset} Requires Auth

Delete Preset

Delete Preset

Delete a proxy configuration preset by its ID. This action is permanent and cannot be undone.

Path Parameters
Name Type Required Description
proxy_preset integer Required The ID of the preset to delete.
curl -X DELETE https://api.proxyhat.com/v1/proxy-presets/1 \
  -H "Authorization: Bearer __API_KEY__" \
  -H "Accept: application/json"
import requests

preset_id = 1

response = requests.delete(
    f"https://api.proxyhat.com/v1/proxy-presets/{preset_id}",
    headers={
        "Authorization": "Bearer __API_KEY__",
        "Accept": "application/json",
    },
)

result = response.json()
print(f"Success: {result[\"success\"]}")
const presetId = 1;

const response = await fetch(`https://api.proxyhat.com/v1/proxy-presets/${presetId}`, {
  method: "DELETE",
  headers: {
    "Authorization": "Bearer __API_KEY__",
    "Accept": "application/json",
  },
});

const result = await response.json();
console.log(`Success: ${result.success}`);
presetID := 1
url := fmt.Sprintf("https://api.proxyhat.com/v1/proxy-presets/%d", presetID)

req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Set("Authorization", "Bearer __API_KEY__")
req.Header.Set("Accept", "application/json")

resp, err := http.DefaultClient.Do(req)
if err != nil {
    log.Fatal(err)
}
defer resp.Body.Close()

var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Println(result["success"])
Response 200
{
  "success": true
}