Proxies API
Manage proxies programmatically. Add, update, test, and assign proxies to profiles via REST API. Bulk operations and connection testing included.
Automate proxy management. Add 100 proxies in one request. Test connections before assignment. Rotate proxies across profiles programmatically.
Base URL
All proxy endpoints use:
https://api.multilogin.io/v1/proxiesList All Proxies
Get all proxies in your account.
Endpoint:
GET /v1/proxiesQuery Parameters:
| Parameter | Type | Description |
|---|---|---|
type | string | Filter by type (http, socks5, socks4) |
status | string | Filter by status (active, failed, testing) |
limit | integer | Results per page (max: 100) |
Response:
{
"success": true,
"data": [
{
"id": "prx_abc123",
"protocol": "socks5",
"host": "proxy.provider.com",
"port": 1080,
"username": "user123",
"country": "US",
"city": "New York",
"status": "active",
"last_tested": "2024-02-20T09:00:00Z",
"assigned_profiles": 3,
"created_at": "2024-01-10T12:00:00Z"
}
]
}Add a Proxy
Add a new proxy to your account.
Endpoint:
POST /v1/proxiesRequest Body:
{
"protocol": "socks5",
"host": "proxy.provider.com",
"port": 1080,
"username": "user123",
"password": "pass456",
"tags": ["residential", "us-east"]
}Example Request:
const response = await fetch('https://api.multilogin.io/v1/proxies', {
method: 'POST',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
protocol: "socks5",
host: "residential-proxy.com",
port: 1080,
username: "user-session-abc123",
password: "secret",
tags: ["residential", "rotating"]
})
});
const data = await response.json();Response:
{
"success": true,
"data": {
"id": "prx_xyz789",
"protocol": "socks5",
"host": "residential-proxy.com",
"port": 1080,
"status": "testing",
"created_at": "2024-02-20T10:30:00Z"
}
}Test a Proxy
Test proxy connection and get details (IP, location, speed).
Endpoint:
POST /v1/proxies/:id/testExample Request:
const response = await fetch('https://api.multilogin.io/v1/proxies/prx_abc123/test', {
method: 'POST',
headers: {
'Authorization': `Bearer ${API_KEY}`
}
});
const data = await response.json();Response (Success):
{
"success": true,
"data": {
"status": "active",
"ip": "198.51.100.42",
"country": "US",
"city": "New York",
"isp": "Verizon",
"latency_ms": 45,
"speed_mbps": 12.5,
"tested_at": "2024-02-20T10:35:00Z"
}
}Response (Failure):
{
"success": false,
"data": {
"status": "failed",
"error": "Connection timeout",
"tested_at": "2024-02-20T10:35:00Z"
}
}Update a Proxy
Update proxy credentials or settings.
Endpoint:
PATCH /v1/proxies/:idExample Request:
await fetch('https://api.multilogin.io/v1/proxies/prx_abc123', {
method: 'PATCH',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
username: "new-username-session-xyz",
password: "new-password",
tags: ["residential", "rotating", "premium"]
})
});Assign Proxy to Profile
Assign a proxy to a specific profile.
Endpoint:
POST /v1/proxies/:id/assignRequest Body:
{
"profile_id": "prof_abc123"
}Response:
{
"success": true,
"message": "Proxy assigned to profile successfully"
}Bulk Add Proxies
Add multiple proxies in one request. Useful when importing from proxy providers.
Endpoint:
POST /v1/proxies/bulkRequest Body:
{
"proxies": [
{
"protocol": "socks5",
"host": "proxy1.provider.com",
"port": 1080,
"username": "user1",
"password": "pass1"
},
{
"protocol": "http",
"host": "proxy2.provider.com",
"port": 8080,
"username": "user2",
"password": "pass2"
}
],
"auto_test": true
}Example Request:
const proxies = [
{ protocol: "socks5", host: "proxy1.com", port: 1080, username: "u1", password: "p1" },
{ protocol: "socks5", host: "proxy2.com", port: 1080, username: "u2", password: "p2" },
{ protocol: "socks5", host: "proxy3.com", port: 1080, username: "u3", password: "p3" }
];
const response = await fetch('https://api.multilogin.io/v1/proxies/bulk', {
method: 'POST',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
proxies: proxies,
auto_test: true
})
});Response:
{
"success": true,
"data": {
"created": 3,
"failed": 0,
"proxies": [
{"id": "prx_aaa111", "status": "testing"},
{"id": "prx_bbb222", "status": "testing"},
{"id": "prx_ccc333", "status": "active"}
]
}
}💡 Auto-Test Feature
Set auto_test: true to automatically test all proxies after creation. Failed proxies get marked but still added to your account for later retry.
Bulk Assign Proxies
Distribute proxies across multiple profiles. One proxy per profile.
Endpoint:
POST /v1/proxies/bulk-assignRequest Body:
{
"proxy_ids": ["prx_aaa111", "prx_bbb222", "prx_ccc333"],
"profile_ids": ["prof_111", "prof_222", "prof_333"]
}First proxy goes to first profile. Second to second. And so on.
Response:
{
"success": true,
"data": {
"assigned": 3,
"assignments": [
{"profile_id": "prof_111", "proxy_id": "prx_aaa111"},
{"profile_id": "prof_222", "proxy_id": "prx_bbb222"},
{"profile_id": "prof_333", "proxy_id": "prx_ccc333"}
]
}
}Get Proxy Stats
Get usage statistics for a proxy.
Endpoint:
GET /v1/proxies/:id/statsResponse:
{
"success": true,
"data": {
"id": "prx_abc123",
"assigned_profiles": 5,
"total_requests": 12847,
"bandwidth_used_mb": 2341,
"uptime_percentage": 99.2,
"avg_latency_ms": 52,
"success_rate": 98.5,
"last_used": "2024-02-20T09:45:00Z"
}
}Delete a Proxy
Remove a proxy from your account.
Endpoint:
DELETE /v1/proxies/:idIf proxy is assigned to profiles, they'll lose proxy connection. Unassign first.
Response:
{
"success": true,
"message": "Proxy deleted successfully"
}Common Use Cases
Import proxies from CSV:
const fs = require('fs');
const csv = require('csv-parser');
const proxies = [];
fs.createReadStream('proxies.csv')
.pipe(csv())
.on('data', (row) => {
proxies.push({
protocol: row.protocol,
host: row.host,
port: parseInt(row.port),
username: row.username,
password: row.password
});
})
.on('end', async () => {
// Bulk add all proxies
const response = await fetch('https://api.multilogin.io/v1/proxies/bulk', {
method: 'POST',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
proxies: proxies,
auto_test: true
})
});
});Rotate proxies across profiles:
// Get all proxies
const proxiesRes = await fetch('https://api.multilogin.io/v1/proxies?status=active');
const proxies = await proxiesRes.json();
// Get all profiles
const profilesRes = await fetch('https://api.multilogin.io/v1/profiles');
const profiles = await profilesRes.json();
// Assign proxies in round-robin
for (let i = 0; i < profiles.data.length; i++) {
const profile = profiles.data[i];
const proxy = proxies.data[i % proxies.data.length];
await fetch(`https://api.multilogin.io/v1/proxies/${proxy.id}/assign`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ profile_id: profile.id })
});
}Nina Petrov
Infrastructure API Engineer
Nina Petrov builds proxy infrastructure APIs at Multilogin.io. She's optimized proxy testing to 100ms latency and handles 50,000+ proxy assignments daily.