Skip to main content
POST
/
api
/
instance
/
proxy
/
:instance
Update Proxy
curl --request POST \
  --url https://api.example.com/api/instance/proxy/:instance \
  --header 'Content-Type: <content-type>' \
  --header 'token: <token>' \
  --data '
{
  "enabled": true,
  "host": "<string>",
  "port": "<string>",
  "protocol": "<string>",
  "username": "<string>",
  "password": "<string>"
}
'

Documentation Index

Fetch the complete documentation index at: https://docs.ryzeapi.cloud/llms.txt

Use this file to discover all available pages before exploring further.

Auth: TokenAccount or TokenInstanceRate-limit: Global (100/min) • Idempotent: yes

Description

Sets an HTTP, HTTPS, or SOCKS5 proxy specific to the instance. The configuration only takes effect after /reconnect or a new /connect.

Examples

Authenticated SOCKS5

Configures a SOCKS5 proxy on port 1080 with user and password. The password is encrypted at-rest with AES-256-GCM and never returns in plaintext in the response.
curl -X POST "https://ryzeapi.cloud/api/instance/proxy/my-instance" \
  -H "token: $Token_Instance" \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": true,
    "host": "proxy.example.com",
    "port": "1080",
    "protocol": "socks5",
    "username": "user1",
    "password": "secret"
  }'

HTTP without auth

Points to an internal HTTP proxy (10.0.0.5:3128) without credentials, common scenario in corporate networks with auth-by-IP or open proxy.
curl -X POST "https://ryzeapi.cloud/api/instance/proxy/my-instance" \
  -H "token: $Token_Instance" \
  -H "Content-Type: application/json" \
  -d '{"enabled":true,"host":"10.0.0.5","port":"3128","protocol":"http"}'

Disable

Sends only enabled: false to remove the individual proxy from the instance. It goes back to using the deploy global proxy (if any) or a direct connection on the next reconnection.
curl -X POST "https://ryzeapi.cloud/api/instance/proxy/my-instance" \
  -H "token: $Token_Instance" \
  -H "Content-Type: application/json" \
  -d '{"enabled":false}'

Success response

200 OK
{
  "success": true,
  "message": "Proxy configuration updated successfully",
  "proxy": {
    "enabled": true,
    "host": "proxy.example.com",
    "port": "1080",
    "protocol": "socks5",
    "username": "user1",
    "password": ""
  }
}
The password appears as an empty string ("") in the response, the server never returns the password in plaintext.

Path parameters

instance
string
required
Instance name.

Headers

token
string
required
TokenAccount or TokenInstance.
Content-Type
string
required
application/json.

Request body

enabled
boolean
required
Enables/disables the instance proxy.
host
string
IP or hostname. Required if enabled=true.
port
string
Port as a string ("1080", "8080"). Required if enabled=true.
protocol
string
"http", "https", or "socks5". Required if enabled=true.
username
string
User (optional).
password
string
Password (optional, encrypted at-rest).

Rules

  • enabled=true requires host, port, and protocol.
  • protocol must be http, https, or socks5.
  • username / password are optional (open proxy or auth-by-IP).
  • enabled=false makes the instance go back to using the default deploy proxy (if any).
  • The password is encrypted at-rest (AES-256-GCM) and redacted in the response.

Notes

The instance individual proxy has priority over the deploy global proxy. If enabled=false, the instance uses the global proxy (if any) or a direct connection.
Proxy changes do not reconnect automatically, call reconnect to apply.

Errors

HTTPerror.messageWhen
400Invalid request bodyMalformed JSON.
400Host is required when proxy is enabledenabled=true without host.
400Port is required when proxy is enabledenabled=true without port.
400Protocol is required when proxy is enabledenabled=true without protocol.
400Protocol must be one of: http, https, socks5protocol outside the enum.
401Invalid tokenToken missing or invalid.
404Instance not foundName does not exist.
429Rate limit exceeded. Try again later.More than 100 req/min.
500Failed to update proxy configurationDatabase error.
{
  "success": false,
  "error": {
    "message": "Protocol must be one of: http, https, socks5"
  }
}