Products
Datacenter proxies from $19/mo Rotating proxies from $25/mo ISP proxies from $33/mo Dedicated proxies from $3.50/mo UDP proxies from $5/mo Try proxies
Use cases
Data & scraping AI services Social media & messaging E-commerce & finance Media & entertainment Marketing & ads Automation & tools All use cases →
Pricing
Full pricing table All locations Money-back guarantee
Resources
Dashboard guide API reference API and MCP Setup guides FAQ Blog For business About us Affiliate program
New dashboard
English
English Русский

Rotating sessions

10 endpoints · base URL https://papaproxy.net/account_new · authentication

Get rotating gateway settings

GET/api/v1/customer/services/{service_id}/proxy/config
API key required scope services:read

Gateway hostnames and ports (HTTP, HTTPS, SOCKS5) of a rotating proxy service.

Parameters

FieldTypeDescription
service_id (path) requiredstring (uuid)ID of the service.

Request example Try it in the Dashboard

cURL
curl -X GET "https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/config" \
  -H "Authorization: Bearer $PAPAPROXY_API_KEY"
Python
import os

import requests

resp = requests.get(
    "https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/config",
    headers={"Authorization": f"Bearer {os.environ['PAPAPROXY_API_KEY']}"},
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
Node.js
const resp = await fetch("https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/config", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.PAPAPROXY_API_KEY}`,
  },
});
if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
console.log(await resp.json());
PHP
<?php
$ch = curl_init('https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/config');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('PAPAPROXY_API_KEY'),
    ],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
var_dump($status, json_decode($response, true));
Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
)

func main() {
	req, err := http.NewRequest("GET", "https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/config", nil)
	if err != nil {
		panic(err)
	}
	req.Header.Set("Authorization", "Bearer "+os.Getenv("PAPAPROXY_API_KEY"))
	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()
	data, _ := io.ReadAll(resp.Body)
	fmt.Println(resp.Status, string(data))
}

Responses

  • 200 Connection settings of a rotating proxy service. · 13 fields
    Example response · JSON
    {
      "endpoint": "papaproxy.pro",
      "endpoints": [
        "papaproxy.pro"
      ],
      "https_endpoints": [
        "eu01.gateway.example.com",
        "us01.gateway.example.com"
      ],
      "port": 3081,
      "http_ports": [
        3081,
        3082,
        3083,
        3084,
        3085,
        3086,
        3087,
        3088,
        3089,
        3090,
        3091,
        3092,
        3093,
        3094
      ],
      "socks_ports": [
        2081,
        2082,
        2083,
        2084,
        2085,
        2086,
        2087,
        2088,
        2089,
        2090,
        2091,
        2092,
        2093,
        2094
      ],
      "sticky_http": 5080,
      "sticky_socks5": 4080,
      "sticky_https": 4443,
      "session_format": "ip:port:username:password",
      "mode": "sticky",
      "sample_connection_string": "papaproxy.pro:3081:pp_user_3fa85f64:Xk9mQ2vL7pRt",
      "sample_connection_strings": [
        "papaproxy.pro:3081:pp_user_3fa85f64:Xk9mQ2vL7pRt"
      ]
    }
    FieldTypeDescription
    endpoint requiredstring
    endpointsarray of string
    https_endpointsarray of string
    port requiredinteger
    http_portsarray of integerHTTP ports.
    socks_portsarray of integerSOCKS5 ports.
    sticky_httpinteger, nullable
    sticky_socks5integer, nullable
    sticky_httpsinteger, nullable
    session_formatstringDefault: "ip:port:username:password"
    modestringDefault: "rotating"
    sample_connection_stringstring, nullable
    sample_connection_stringsarray of string
  • 401 The API key is missing, malformed, revoked, or expired, or the account is inactive.
    Example · JSON
    {
      "detail": "Invalid or revoked API key."
    }
  • 403 The API key lacks scope services:read.
    Example · JSON
    {
      "detail": "API key is missing required scope: services:read"
    }
  • 404 Service not found, or it doesn't belong to your account.
    Example · JSON
    {
      "detail": "Service 3fa85f64-5717-4562-b3fc-2c963f66afa6 not found."
    }
  • 422 Validation error: a field is missing or has the wrong type or value.
    Example · JSON
    {
      "detail": "Validation error"
    }
  • 429 Too many requests: the per-account limit is 60 requests per minute, shared by all keys and the MCP server. Retry with exponential backoff.
    Example · JSON
    {
      "detail": "Too Many Requests"
    }

List sticky sessions

GET/api/v1/customer/services/{service_id}/proxy/sticky/sessions
API key required scope services:read

List sticky sessions for a rotating proxy service.

Parameters

FieldTypeDescription
service_id (path) requiredstring (uuid)ID of the service.

Request example Try it in the Dashboard

cURL
curl -X GET "https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/sessions" \
  -H "Authorization: Bearer $PAPAPROXY_API_KEY"
Python
import os

import requests

resp = requests.get(
    "https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/sessions",
    headers={"Authorization": f"Bearer {os.environ['PAPAPROXY_API_KEY']}"},
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
Node.js
const resp = await fetch("https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/sessions", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.PAPAPROXY_API_KEY}`,
  },
});
if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
console.log(await resp.json());
PHP
<?php
$ch = curl_init('https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/sessions');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('PAPAPROXY_API_KEY'),
    ],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
var_dump($status, json_decode($response, true));
Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
)

func main() {
	req, err := http.NewRequest("GET", "https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/sessions", nil)
	if err != nil {
		panic(err)
	}
	req.Header.Set("Authorization", "Bearer "+os.Getenv("PAPAPROXY_API_KEY"))
	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()
	data, _ := io.ReadAll(resp.Body)
	fmt.Println(resp.Status, string(data))
}

Responses

  • 200 Active sticky sessions for a rotating service. · 14 fields
    Example response · JSON
    {
      "service_id": "3bd2e419-2dc6-52bb-9d74-0a4560d55f53",
      "username": "pp_user_3fa85f64",
      "sessions": []
    }
    FieldTypeDescription
    service_id requiredstring (uuid)ID of the service.
    username requiredstringProxy username.
    sessions requiredarray of object
    sessions[].sid requiredstringSticky session ID.
    sessions[].session_id requiredstring
    sessions[].server requiredstring
    sessions[].exit requiredstringExit IP of the session.
    sessions[].exit_addr requiredstringExit IP and port of the session.
    sessions[].is_defaultbooleanDefault: false
    sessions[].createdstring, nullable
    sessions[].last_usedstring, nullable
    sessions[].ttl_secondsinteger, nullableSticky session duration, in seconds.
    sessions[].expires_atstring, nullableWhen the current term ends (ISO 8601, UTC).
    sessions[].modestring, nullable
  • 401 The API key is missing, malformed, revoked, or expired, or the account is inactive.
    Example · JSON
    {
      "detail": "Invalid or revoked API key."
    }
  • 403 The API key lacks scope services:read.
    Example · JSON
    {
      "detail": "API key is missing required scope: services:read"
    }
  • 404 Service not found, or it doesn't belong to your account.
    Example · JSON
    {
      "detail": "Service 3fa85f64-5717-4562-b3fc-2c963f66afa6 not found."
    }
  • 422 Validation error: a field is missing or has the wrong type or value.
    Example · JSON
    {
      "detail": "Validation error"
    }
  • 429 Too many requests: the per-account limit is 60 requests per minute, shared by all keys and the MCP server. Retry with exponential backoff.
    Example · JSON
    {
      "detail": "Too Many Requests"
    }

Rotate a sticky session

POST/api/v1/customer/services/{service_id}/proxy/sticky/sessions/{sid}/rotate
API key required scope services:write

Force a new exit IP for one sticky session. Free; this is not an IP list refresh.

Parameters

FieldTypeDescription
service_id (path) requiredstring (uuid)ID of the service.
sid (path) requiredstringID of the sticky session.

Request example Try it in the Dashboard

cURL
curl -X POST "https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/sessions/string/rotate" \
  -H "Authorization: Bearer $PAPAPROXY_API_KEY"
Python
import os

import requests

resp = requests.post(
    "https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/sessions/string/rotate",
    headers={"Authorization": f"Bearer {os.environ['PAPAPROXY_API_KEY']}"},
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
Node.js
const resp = await fetch("https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/sessions/string/rotate", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.PAPAPROXY_API_KEY}`,
  },
});
if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
console.log(await resp.json());
PHP
<?php
$ch = curl_init('https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/sessions/string/rotate');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('PAPAPROXY_API_KEY'),
    ],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
var_dump($status, json_decode($response, true));
Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
)

func main() {
	req, err := http.NewRequest("POST", "https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/sessions/string/rotate", nil)
	if err != nil {
		panic(err)
	}
	req.Header.Set("Authorization", "Bearer "+os.Getenv("PAPAPROXY_API_KEY"))
	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()
	data, _ := io.ReadAll(resp.Body)
	fmt.Println(resp.Status, string(data))
}

Responses

  • 200 Result of moving one sticky session to a new exit IP. · 4 fields
    FieldTypeDescription
    sid requiredstringSticky session ID.
    exit requiredstringExit IP of the session.
    exit_addr requiredstringExit IP and port of the session.
    statusstringDefault: "rotated"
  • 401 The API key is missing, malformed, revoked, or expired, or the account is inactive.
    Example · JSON
    {
      "detail": "Invalid or revoked API key."
    }
  • 403 The API key lacks scope services:write.
    Example · JSON
    {
      "detail": "API key is missing required scope: services:write"
    }
  • 404 Sticky session not found, or it doesn't belong to your account. — error format
  • 422 Validation error: a field is missing or has the wrong type or value.
    Example · JSON
    {
      "detail": "Validation error"
    }
  • 429 Too many requests: the per-account limit is 60 requests per minute, shared by all keys and the MCP server. Retry with exponential backoff.
    Example · JSON
    {
      "detail": "Too Many Requests"
    }

End a sticky session

DELETE/api/v1/customer/services/{service_id}/proxy/sticky/sessions/{sid}
API key required scope services:write

End one sticky session; its next request gets a new exit IP.

Parameters

FieldTypeDescription
service_id (path) requiredstring (uuid)ID of the service.
sid (path) requiredstringID of the sticky session.

Request example Try it in the Dashboard

cURL
curl -X DELETE "https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/sessions/string" \
  -H "Authorization: Bearer $PAPAPROXY_API_KEY"
Python
import os

import requests

resp = requests.delete(
    "https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/sessions/string",
    headers={"Authorization": f"Bearer {os.environ['PAPAPROXY_API_KEY']}"},
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
Node.js
const resp = await fetch("https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/sessions/string", {
  method: "DELETE",
  headers: {
    Authorization: `Bearer ${process.env.PAPAPROXY_API_KEY}`,
  },
});
if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
console.log(await resp.json());
PHP
<?php
$ch = curl_init('https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/sessions/string');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'DELETE',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('PAPAPROXY_API_KEY'),
    ],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
var_dump($status, json_decode($response, true));
Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
)

func main() {
	req, err := http.NewRequest("DELETE", "https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/sessions/string", nil)
	if err != nil {
		panic(err)
	}
	req.Header.Set("Authorization", "Bearer "+os.Getenv("PAPAPROXY_API_KEY"))
	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()
	data, _ := io.ReadAll(resp.Body)
	fmt.Println(resp.Status, string(data))
}

Responses

  • 204 The session ended. No response body.
  • 401 The API key is missing, malformed, revoked, or expired, or the account is inactive.
    Example · JSON
    {
      "detail": "Invalid or revoked API key."
    }
  • 403 The API key lacks scope services:write.
    Example · JSON
    {
      "detail": "API key is missing required scope: services:write"
    }
  • 404 Sticky session not found, or it doesn't belong to your account. — error format
  • 422 Validation error: a field is missing or has the wrong type or value.
    Example · JSON
    {
      "detail": "Validation error"
    }
  • 429 Too many requests: the per-account limit is 60 requests per minute, shared by all keys and the MCP server. Retry with exponential backoff.
    Example · JSON
    {
      "detail": "Too Many Requests"
    }

End all sticky sessions

POST/api/v1/customer/services/{service_id}/proxy/sticky/purge
API key required scope services:write

End all sticky sessions of a rotating service.

Parameters

FieldTypeDescription
service_id (path) requiredstring (uuid)ID of the service.

Request example Try it in the Dashboard

cURL
curl -X POST "https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/purge" \
  -H "Authorization: Bearer $PAPAPROXY_API_KEY"
Python
import os

import requests

resp = requests.post(
    "https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/purge",
    headers={"Authorization": f"Bearer {os.environ['PAPAPROXY_API_KEY']}"},
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
Node.js
const resp = await fetch("https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/purge", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.PAPAPROXY_API_KEY}`,
  },
});
if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
console.log(await resp.json());
PHP
<?php
$ch = curl_init('https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/purge');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('PAPAPROXY_API_KEY'),
    ],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
var_dump($status, json_decode($response, true));
Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
)

func main() {
	req, err := http.NewRequest("POST", "https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/purge", nil)
	if err != nil {
		panic(err)
	}
	req.Header.Set("Authorization", "Bearer "+os.Getenv("PAPAPROXY_API_KEY"))
	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()
	data, _ := io.ReadAll(resp.Body)
	fmt.Println(resp.Status, string(data))
}

Responses

  • 200 Result of ending all sticky sessions. · 1 fields
    Example response · JSON
    {
      "deleted": 0
    }
    FieldTypeDescription
    deleted requiredinteger
  • 401 The API key is missing, malformed, revoked, or expired, or the account is inactive.
    Example · JSON
    {
      "detail": "Invalid or revoked API key."
    }
  • 403 The API key lacks scope services:write.
    Example · JSON
    {
      "detail": "API key is missing required scope: services:write"
    }
  • 404 Service not found, or it doesn't belong to your account.
    Example · JSON
    {
      "detail": "Service 3fa85f64-5717-4562-b3fc-2c963f66afa6 not found."
    }
  • 422 Validation error: a field is missing or has the wrong type or value.
    Example · JSON
    {
      "detail": "Validation error"
    }
  • 429 Too many requests: the per-account limit is 60 requests per minute, shared by all keys and the MCP server. Retry with exponential backoff.
    Example · JSON
    {
      "detail": "Too Many Requests"
    }

Get session mode

GET/api/v1/customer/services/{service_id}/proxy/sticky/mode
API key required scope services:read

Current session mode of a rotating service: rotating (new exit IP per request), sticky, or pinned.

Parameters

FieldTypeDescription
service_id (path) requiredstring (uuid)ID of the service.

Request example Try it in the Dashboard

cURL
curl -X GET "https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/mode" \
  -H "Authorization: Bearer $PAPAPROXY_API_KEY"
Python
import os

import requests

resp = requests.get(
    "https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/mode",
    headers={"Authorization": f"Bearer {os.environ['PAPAPROXY_API_KEY']}"},
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
Node.js
const resp = await fetch("https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/mode", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.PAPAPROXY_API_KEY}`,
  },
});
if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
console.log(await resp.json());
PHP
<?php
$ch = curl_init('https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/mode');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('PAPAPROXY_API_KEY'),
    ],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
var_dump($status, json_decode($response, true));
Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
)

func main() {
	req, err := http.NewRequest("GET", "https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/mode", nil)
	if err != nil {
		panic(err)
	}
	req.Header.Set("Authorization", "Bearer "+os.Getenv("PAPAPROXY_API_KEY"))
	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()
	data, _ := io.ReadAll(resp.Body)
	fmt.Println(resp.Status, string(data))
}

Responses

  • 200 Session mode: rotating, sticky, or pinned. · 2 fields
    Example response · JSON
    {
      "mode": "sticky"
    }
    FieldTypeDescription
    mode requiredstring
    pinstring, nullable
  • 401 The API key is missing, malformed, revoked, or expired, or the account is inactive.
    Example · JSON
    {
      "detail": "Invalid or revoked API key."
    }
  • 403 The API key lacks scope services:read.
    Example · JSON
    {
      "detail": "API key is missing required scope: services:read"
    }
  • 404 Service not found, or it doesn't belong to your account.
    Example · JSON
    {
      "detail": "Service 3fa85f64-5717-4562-b3fc-2c963f66afa6 not found."
    }
  • 422 Validation error: a field is missing or has the wrong type or value.
    Example · JSON
    {
      "detail": "Validation error"
    }
  • 429 Too many requests: the per-account limit is 60 requests per minute, shared by all keys and the MCP server. Retry with exponential backoff.
    Example · JSON
    {
      "detail": "Too Many Requests"
    }

Set session mode

PUT/api/v1/customer/services/{service_id}/proxy/sticky/mode
API key required scope services:write

Switch between rotating, sticky, and pinned modes. pin is required for pinned. If your rotating service doesn't support switching the mode, the response is 501; use the sticky session duration endpoints instead.

Parameters

FieldTypeDescription
service_id (path) requiredstring (uuid)ID of the service.

Request body

FieldTypeDescription
mode requiredstringsticky | rotating | pinnedOne of: sticky, rotating, pinned
pinstring, nullableExit IP:port to keep when mode is pinned.

Request example Try it in the Dashboard

cURL
curl -X PUT "https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/mode" \
  -H "Authorization: Bearer $PAPAPROXY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mode": "sticky"}'
Python
import os

import requests

resp = requests.put(
    "https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/mode",
    headers={"Authorization": f"Bearer {os.environ['PAPAPROXY_API_KEY']}"},
    json={
        "mode": "sticky"
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
Node.js
const resp = await fetch("https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/mode", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.PAPAPROXY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "mode": "sticky"
  }),
});
if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
console.log(await resp.json());
PHP
<?php
$ch = curl_init('https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/mode');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('PAPAPROXY_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode([
        'mode' => 'sticky'
    ]),
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
var_dump($status, json_decode($response, true));
Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
	"strings"
)

func main() {
	req, err := http.NewRequest("PUT", "https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/mode", strings.NewReader(`{"mode": "sticky"}`))
	if err != nil {
		panic(err)
	}
	req.Header.Set("Authorization", "Bearer "+os.Getenv("PAPAPROXY_API_KEY"))
	req.Header.Set("Content-Type", "application/json")
	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()
	data, _ := io.ReadAll(resp.Body)
	fmt.Println(resp.Status, string(data))
}

Responses

  • 200 Session mode: rotating, sticky, or pinned. · 2 fields
    Example response · JSON
    {
      "mode": "sticky"
    }
    FieldTypeDescription
    mode requiredstring
    pinstring, nullable
  • 401 The API key is missing, malformed, revoked, or expired, or the account is inactive.
    Example · JSON
    {
      "detail": "Invalid or revoked API key."
    }
  • 403 The API key lacks scope services:write.
    Example · JSON
    {
      "detail": "API key is missing required scope: services:write"
    }
  • 404 Service not found, or it doesn't belong to your account.
    Example · JSON
    {
      "detail": "Service 3fa85f64-5717-4562-b3fc-2c963f66afa6 not found."
    }
  • 422 Validation error: a field is missing or has the wrong type or value.
    Example · JSON
    {
      "detail": "Validation error"
    }
  • 429 Too many requests: the per-account limit is 60 requests per minute, shared by all keys and the MCP server. Retry with exponential backoff.
    Example · JSON
    {
      "detail": "Too Many Requests"
    }
  • 501 Switching the session mode isn't supported for this service.
    Example · JSON
    {
      "detail": "Sticky mode is not supported by the configured upstream."
    }

Get sticky session duration

GET/api/v1/customer/services/{service_id}/proxy/sticky/ttl
API key required scope services:read

How long a sticky session keeps the same exit IP, in seconds.

Parameters

FieldTypeDescription
service_id (path) requiredstring (uuid)ID of the service.

Request example Try it in the Dashboard

cURL
curl -X GET "https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/ttl" \
  -H "Authorization: Bearer $PAPAPROXY_API_KEY"
Python
import os

import requests

resp = requests.get(
    "https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/ttl",
    headers={"Authorization": f"Bearer {os.environ['PAPAPROXY_API_KEY']}"},
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
Node.js
const resp = await fetch("https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/ttl", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.PAPAPROXY_API_KEY}`,
  },
});
if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
console.log(await resp.json());
PHP
<?php
$ch = curl_init('https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/ttl');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('PAPAPROXY_API_KEY'),
    ],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
var_dump($status, json_decode($response, true));
Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
)

func main() {
	req, err := http.NewRequest("GET", "https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/ttl", nil)
	if err != nil {
		panic(err)
	}
	req.Header.Set("Authorization", "Bearer "+os.Getenv("PAPAPROXY_API_KEY"))
	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()
	data, _ := io.ReadAll(resp.Body)
	fmt.Println(resp.Status, string(data))
}

Responses

  • 200 Sticky session duration, in seconds. · 4 fields
    Example response · JSON
    {
      "ttl_seconds": 900,
      "is_custom": false,
      "global_default_ttl": 900,
      "ttl_human": "15m"
    }
    FieldTypeDescription
    ttl_secondsinteger, nullableSticky session duration, in seconds.
    is_custombooleanDefault: false
    global_default_ttlinteger, nullable
    ttl_humanstring, nullable
  • 401 The API key is missing, malformed, revoked, or expired, or the account is inactive.
    Example · JSON
    {
      "detail": "Invalid or revoked API key."
    }
  • 403 The API key lacks scope services:read.
    Example · JSON
    {
      "detail": "API key is missing required scope: services:read"
    }
  • 404 Service not found, or it doesn't belong to your account.
    Example · JSON
    {
      "detail": "Service 3fa85f64-5717-4562-b3fc-2c963f66afa6 not found."
    }
  • 422 Validation error: a field is missing or has the wrong type or value.
    Example · JSON
    {
      "detail": "Validation error"
    }
  • 429 Too many requests: the per-account limit is 60 requests per minute, shared by all keys and the MCP server. Retry with exponential backoff.
    Example · JSON
    {
      "detail": "Too Many Requests"
    }

Set sticky session duration

PUT/api/v1/customer/services/{service_id}/proxy/sticky/ttl
API key required scope services:write

Set how long a sticky session keeps the same exit IP, in seconds (minimum 30).

Parameters

FieldTypeDescription
service_id (path) requiredstring (uuid)ID of the service.

Request body

FieldTypeDescription
seconds requiredintegerTTL override in seconds (minimum 30)Minimum: 30

Request example Try it in the Dashboard

cURL
curl -X PUT "https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/ttl" \
  -H "Authorization: Bearer $PAPAPROXY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"seconds": 600}'
Python
import os

import requests

resp = requests.put(
    "https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/ttl",
    headers={"Authorization": f"Bearer {os.environ['PAPAPROXY_API_KEY']}"},
    json={
        "seconds": 600
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
Node.js
const resp = await fetch("https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/ttl", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.PAPAPROXY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "seconds": 600
  }),
});
if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
console.log(await resp.json());
PHP
<?php
$ch = curl_init('https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/ttl');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('PAPAPROXY_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode([
        'seconds' => 600
    ]),
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
var_dump($status, json_decode($response, true));
Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
	"strings"
)

func main() {
	req, err := http.NewRequest("PUT", "https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/ttl", strings.NewReader(`{"seconds": 600}`))
	if err != nil {
		panic(err)
	}
	req.Header.Set("Authorization", "Bearer "+os.Getenv("PAPAPROXY_API_KEY"))
	req.Header.Set("Content-Type", "application/json")
	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()
	data, _ := io.ReadAll(resp.Body)
	fmt.Println(resp.Status, string(data))
}

Responses

  • 200 Sticky session duration, in seconds. · 4 fields
    Example response · JSON
    {
      "ttl_seconds": 600,
      "is_custom": true,
      "global_default_ttl": 900,
      "ttl_human": "10m"
    }
    FieldTypeDescription
    ttl_secondsinteger, nullableSticky session duration, in seconds.
    is_custombooleanDefault: false
    global_default_ttlinteger, nullable
    ttl_humanstring, nullable
  • 401 The API key is missing, malformed, revoked, or expired, or the account is inactive.
    Example · JSON
    {
      "detail": "Invalid or revoked API key."
    }
  • 403 The API key lacks scope services:write.
    Example · JSON
    {
      "detail": "API key is missing required scope: services:write"
    }
  • 404 Service not found, or it doesn't belong to your account.
    Example · JSON
    {
      "detail": "Service 3fa85f64-5717-4562-b3fc-2c963f66afa6 not found."
    }
  • 422 Validation error: a field is missing or has the wrong type or value.
    Example · JSON
    {
      "detail": "Validation error"
    }
  • 429 Too many requests: the per-account limit is 60 requests per minute, shared by all keys and the MCP server. Retry with exponential backoff.
    Example · JSON
    {
      "detail": "Too Many Requests"
    }

Reset sticky session duration

DELETE/api/v1/customer/services/{service_id}/proxy/sticky/ttl
API key required scope services:write

Return the sticky session duration to the default.

Parameters

FieldTypeDescription
service_id (path) requiredstring (uuid)ID of the service.

Request example Try it in the Dashboard

cURL
curl -X DELETE "https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/ttl" \
  -H "Authorization: Bearer $PAPAPROXY_API_KEY"
Python
import os

import requests

resp = requests.delete(
    "https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/ttl",
    headers={"Authorization": f"Bearer {os.environ['PAPAPROXY_API_KEY']}"},
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
Node.js
const resp = await fetch("https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/ttl", {
  method: "DELETE",
  headers: {
    Authorization: `Bearer ${process.env.PAPAPROXY_API_KEY}`,
  },
});
if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
console.log(await resp.json());
PHP
<?php
$ch = curl_init('https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/ttl');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'DELETE',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('PAPAPROXY_API_KEY'),
    ],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
var_dump($status, json_decode($response, true));
Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
)

func main() {
	req, err := http.NewRequest("DELETE", "https://papaproxy.net/account_new/api/v1/customer/services/3fa85f64-5717-4562-b3fc-2c963f66afa6/proxy/sticky/ttl", nil)
	if err != nil {
		panic(err)
	}
	req.Header.Set("Authorization", "Bearer "+os.Getenv("PAPAPROXY_API_KEY"))
	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()
	data, _ := io.ReadAll(resp.Body)
	fmt.Println(resp.Status, string(data))
}

Responses

  • 200 Sticky session duration, in seconds. · 4 fields
    Example response · JSON
    {
      "ttl_seconds": 900,
      "is_custom": false,
      "global_default_ttl": 900,
      "ttl_human": "15m"
    }
    FieldTypeDescription
    ttl_secondsinteger, nullableSticky session duration, in seconds.
    is_custombooleanDefault: false
    global_default_ttlinteger, nullable
    ttl_humanstring, nullable
  • 401 The API key is missing, malformed, revoked, or expired, or the account is inactive.
    Example · JSON
    {
      "detail": "Invalid or revoked API key."
    }
  • 403 The API key lacks scope services:write.
    Example · JSON
    {
      "detail": "API key is missing required scope: services:write"
    }
  • 404 Service not found, or it doesn't belong to your account.
    Example · JSON
    {
      "detail": "Service 3fa85f64-5717-4562-b3fc-2c963f66afa6 not found."
    }
  • 422 Validation error: a field is missing or has the wrong type or value.
    Example · JSON
    {
      "detail": "Validation error"
    }
  • 429 Too many requests: the per-account limit is 60 requests per minute, shared by all keys and the MCP server. Retry with exponential backoff.
    Example · JSON
    {
      "detail": "Too Many Requests"
    }

Last updated: November 9, 2026. Generated from the OpenAPI 3.1 specification (API version 0.1.0). Markdown version for AI agents.