Stateful Sessions

Update a stateful session

Change a session's name, status or rules. Your client keeps the same connection string; the next request picks up the change. Renaming is the exception: the username is stateful-<name>, so a rename changes it.

Send only what you want to change. In ruleset, an omitted field keeps its stored value and an explicit null clears a geo field or network_type. lookalike, rotation_trigger and error_handling cannot be null.

Changing a geo field to a different value clears the fields beneath it that you did not send: changing country clears region, city, isp, asn and zip; changing region clears city, isp, asn and zip; changing city clears isp, asn and zip. isp, asn and zip never clear one another.

Set status to disabled to stop a session carrying traffic without losing its name, port or rules, and back to enabled to resume. Re-enabling binds a new node; if none is available the call returns 502 and the session stays disabled.

Requires the proxy:packages:write scope.

patch/v1/proxy/packages/{package_id}/stateful-sessions/{session_id}

Request

Path parameters

package_idstring required

The ID of the proxy package (UUID format)

session_idstring required

The ID of the stateful session (UUID format)

Request body

namestring nullable

New name, ^[a-z0-9]{1,16}$. Changes the connection string username.

status'enabled' | 'disabled'

Response

Successful Response

idstring required
proxy_idstring required
namestring required
status'enabled' | 'disabled' required
exit_ipstring required

IP address of the exit node the session is bound to now.

network_typestring required

Network of the bound node. The top-level geo and network fields describe where the session is bound now; ruleset holds what you asked for.

countrystring required
regionstring nullable
citystring nullable
ispstring nullable
asnstring nullable
zipstring nullable
bound_sincestring date-time nullable

When the session was bound to its current node.

portinteger nullable

Gateway port to connect to. IP allowlist packages get a dedicated port per session; credential packages share the gateway port.

created_atstring date-time required
updated_atstring date-time required

Changes

No recorded changes to this operation across all 1 revision of this API.