{
"detail": "None of the 1 requested sessions could be assigned a node; no sessions were created."
}
{
"detail": "None of the 1 requested sessions could be assigned a node; no sessions were created."
}
Stateful Sessions
Create stateful sessions
Create one or more stateful sessions on a package. Each session is bound to a matching exit node before the response returns, so you get its exit IP and connection string straight away.
The ruleset is optional: omit it or send {} to use the defaults (lookalike: false, rotation_trigger: "timed:300", error_handling: "replace"). With count > 1, each session gets the base name plus a number (job gives job1, job2, …).
Node assignment is per session. A session that cannot be bound is discarded, so the response can hold fewer sessions than you asked for: check failed and reason. If none could be bound, the request fails with 503 and a Retry-After header.
Creates for the same package run one at a time; an overlapping create may get 429.
API key secret (starts with s_live_). Create keys in the dashboard under Settings → API keys, or via POST /v1/api-keys/. Send it as Authorization: Bearer <secret>.
Session name, ^[a-z0-9]{1,16}$, unique within the package. With count > 1 it is the base name and each session gets a number appended, which counts toward the 16 characters. Omit it and a name is generated.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"SOAX","colors":{"primary":"#10b77f","light":"#128e65","dark":"#10b77f"},"logo":{"light":"https://mintcdn.com/soax/x2dnBPUF6XiNROo6/logo/logo-wide-black.svg?fit=max\u0026auto=format\u0026n=x2dnBPUF6XiNROo6\u0026q=85\u0026s=8e1801c906e292ef153e926f6a0eb1f2","dark":"https://mintcdn.com/soax/x2dnBPUF6XiNROo6/logo/logo-wide-white.svg?fit=max\u0026auto=format\u0026n=x2dnBPUF6XiNROo6\u0026q=85\u0026s=0c6611fc658f1ec64bf928c6ecf1a105","href":"https://soax.com"},"favicon":"https://mintcdn.com/soax/x2dnBPUF6XiNROo6/logo/favicon.svg?fit=max\u0026auto=format\u0026n=x2dnBPUF6XiNROo6\u0026q=85\u0026s=82cf944d568d4b5bc1bca2be2b4fba7b","background":{"color":{"light":"#f8f7f7","dark":"#131316"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","grok","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"soax","hasAudioNarration":false,"actualSubdomain":"soax","customDomains":["developers.soax.com"],"gitSource":{"type":"github","owner":"soax-org","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6aeb5c1da60f76c94453a387","collectionId":"657c1297-a016-457f-b65c-f595c3a469bc","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6aeb5c1da60f76c94453a387"},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6aeb5c1da60f76c94453a387","clientVersion":"0.0.4067","searchFilterCounts":[{"language":"default","tag":"API Reference","count":34},{"language":"default","tag":"Locations","count":8},{"language":"default","tag":"Stateful Sessions","count":7},{"language":"default","tag":"Troubleshooting","count":7},{"language":"default","tag":"Trust \u0026 Safety","count":6},{"language":"default","tag":"Code Examples","count":5},{"language":"default","tag":"Getting Started","count":5},{"language":"default","tag":"API Keys","count":4},{"language":"default","tag":"Packages","count":4},{"language":"default","tag":"Dashboard","count":4}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api/stateful-sessions/create","slug":"/api/stateful-sessions/create","pageMetadata":{"title":"Create stateful sessions","openapi":"api/openapi.json POST /v1/proxy/packages/{package_id}/stateful-sessions","description":"Create one or more stateful sessions on a package. Each session is bound to a matching exit node before the response returns, so you get its exit IP and connection string straight away.\n\nThe `ruleset` is optional: omit it or send `{}` to use the defaults (`lookalike: false`, `rotation_trigger: \"timed:300\"`, `error_handling: \"replace\"`). With `count` > 1, each session gets the base `name` plus a number (`job` gives `job1`, `job2`, …).\n\nNode assignment is per session. A session that cannot be bound is discarded, so the response can hold fewer sessions than you asked for: check `failed` and `reason`. If none could be bound, the request fails with `503` and a `Retry-After` header.\n\nCreates for the same package run one at a time; an overlapping create may get `429`.\n\nRequires the `proxy:packages:write` scope.","href":"/api/stateful-sessions/create"},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Create one or more stateful sessions on a package. Each session is bound to a matching exit node before the response returns, so you get its exit IP and connection string straight away.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The \", _jsx(_components.code, {\n children: \"ruleset\"\n }), \" is optional: omit it or send \", _jsx(_components.code, {\n children: \"{}\"\n }), \" to use the defaults (\", _jsx(_components.code, {\n children: \"lookalike: false\"\n }), \", \", _jsx(_components.code, {\n children: \"rotation_trigger: \\\"timed:300\\\"\"\n }), \", \", _jsx(_components.code, {\n children: \"error_handling: \\\"replace\\\"\"\n }), \"). With \", _jsx(_components.code, {\n children: \"count\"\n }), \" > 1, each session gets the base \", _jsx(_components.code, {\n children: \"name\"\n }), \" plus a number (\", _jsx(_components.code, {\n children: \"job\"\n }), \" gives \", _jsx(_components.code, {\n children: \"job1\"\n }), \", \", _jsx(_components.code, {\n children: \"job2\"\n }), \", …).\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Node assignment is per session. A session that cannot be bound is discarded, so the response can hold fewer sessions than you asked for: check \", _jsx(_components.code, {\n children: \"failed\"\n }), \" and \", _jsx(_components.code, {\n children: \"reason\"\n }), \". If none could be bound, the request fails with \", _jsx(_components.code, {\n children: \"503\"\n }), \" and a \", _jsx(_components.code, {\n children: \"Retry-After\"\n }), \" header.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Creates for the same package run one at a time; an overlapping create may get \", _jsx(_components.code, {\n children: \"429\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Requires the \", _jsx(_components.code, {\n children: \"proxy:packages:write\"\n }), \" scope.\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create stateful sessions","openapi":"api/openapi.json POST /v1/proxy/packages/{package_id}/stateful-sessions","description":"Create one or more stateful sessions on a package. Each session is bound to a matching exit node before the response returns, so you get its exit IP and connection string straight away.\n\nThe `ruleset` is optional: omit it or send `{}` to use the defaults (`lookalike: false`, `rotation_trigger: \"timed:300\"`, `error_handling: \"replace\"`). With `count` > 1, each session gets the base `name` plus a number (`job` gives `job1`, `job2`, …).\n\nNode assignment is per session. A session that cannot be bound is discarded, so the response can hold fewer sessions than you asked for: check `failed` and `reason`. If none could be bound, the request fails with `503` and a `Retry-After` header.\n\nCreates for the same package run one at a time; an overlapping create may get `429`.\n\nRequires the `proxy:packages:write` scope.","href":"/api/stateful-sessions/create"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Stateful Sessions"],"summary":"Create stateful sessions","description":"Create one or more stateful sessions on a package. Each session is bound to a matching exit node before the response returns, so you get its exit IP and connection string straight away.\n\nThe `ruleset` is optional: omit it or send `{}` to use the defaults (`lookalike: false`, `rotation_trigger: \"timed:300\"`, `error_handling: \"replace\"`). With `count` > 1, each session gets the base `name` plus a number (`job` gives `job1`, `job2`, …).\n\nNode assignment is per session. A session that cannot be bound is discarded, so the response can hold fewer sessions than you asked for: check `failed` and `reason`. If none could be bound, the request fails with `503` and a `Retry-After` header.\n\nCreates for the same package run one at a time; an overlapping create may get `429`.\n\nRequires the `proxy:packages:write` scope.","operationId":"create_stateful_session_v1_proxy_packages__package_id__stateful_sessions_post","parameters":["591fbe9b-edbb-4e32-92fa-65af86269675"],"requestBody":"f9559f08-f746-4a4b-b83e-12bd92c5dd8e","responses":{"201":"cfd29a80-c9c0-4702-af70-4f9b2f31caff","400":"7e62bc51-e5dd-4631-b0ec-aaa1db64d57d","401":"83e244db-adb1-4339-a68c-ec0cac18d115","403":"ddd221ed-d2c0-4815-ad7e-6985d6a09b73","404":"a50d6a00-c358-4f73-99b3-2bfe44f1e8a3","422":"98623c3e-3f1d-4f73-ae64-d6bb8f153c39","429":"07b9f82a-650c-41df-b650-54064ab01303","502":"c91b8bb7-dd7c-420b-91ed-be14121496e5","503":"4facf435-80a6-45d7-be80-9f04407eea93"},"method":"post","type":"path","servers":["06663dcd-10ca-4caf-88d2-0c3b470373f4"],"security":["82a1fae4-d039-4b2f-ad57-104d7467f72b"],"path":"/v1/proxy/packages/{package_id}/stateful-sessions","baseUrlOptions":["https://api.platform.soax.com"],"title":"Create stateful sessions","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"591fbe9b-edbb-4e32-92fa-65af86269675":{"name":"package_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","description":"The ID of the proxy package (UUID format)","title":"Package Id","isRequired":true,"uniqueKey":"","typeLabel":"string"},"description":"The ID of the proxy package (UUID format)"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"name":{"oneOf":[{"type":"string","title":"Name","description":"Session name, `^[a-z0-9]{1,16}$`, unique within the package. With `count` > 1 it is the base name and each session gets a number appended, which counts toward the 16 characters. Omit it and a name is generated.","uniqueKey":"name.oneOf.0","typeLabel":"string"},{"type":"null","title":"Name","description":"Session name, `^[a-z0-9]{1,16}$`, unique within the package. With `count` > 1 it is the base name and each session gets a number appended, which counts toward the 16 characters. Omit it and a name is generated.","uniqueKey":"name.oneOf.1","typeLabel":"null"}],"uniqueKey":"name","typeLabel":"string | null"},"ruleset":{"properties":{"network_type":{"oneOf":[{"type":"string","title":"Network Type","description":"`wifi` (residential), `mobile`, or `any`. Must be enabled on the package.","enum":["wifi","mobile","any"],"uniqueKey":"ruleset.network_type.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","title":"Network Type","description":"`wifi` (residential), `mobile`, or `any`. Must be enabled on the package.","uniqueKey":"ruleset.network_type.oneOf.1","typeLabel":"null"}],"uniqueKey":"ruleset.network_type","typeLabel":"enum\u003cstring> | null"},"country":{"oneOf":[{"type":"string","title":"Country","description":"Two-letter country code, or `any`. Must be available on the package. Required when any of `region`, `city`, `isp`, `asn` or `zip` is set.","uniqueKey":"ruleset.country.oneOf.0","typeLabel":"string"},{"type":"null","title":"Country","description":"Two-letter country code, or `any`. Must be available on the package. Required when any of `region`, `city`, `isp`, `asn` or `zip` is set.","uniqueKey":"ruleset.country.oneOf.1","typeLabel":"null"}],"uniqueKey":"ruleset.country","typeLabel":"string | null"},"region":{"oneOf":[{"type":"string","title":"Region","description":"Region code from the package location endpoints. Must belong to `country`.","uniqueKey":"ruleset.region.oneOf.0","typeLabel":"string"},{"type":"null","title":"Region","description":"Region code from the package location endpoints. Must belong to `country`.","uniqueKey":"ruleset.region.oneOf.1","typeLabel":"null"}],"uniqueKey":"ruleset.region","typeLabel":"string | null"},"city":{"oneOf":[{"type":"string","title":"City","description":"City code from the package location endpoints. Must belong to `region`, or to `country` when no region is set.","uniqueKey":"ruleset.city.oneOf.0","typeLabel":"string"},{"type":"null","title":"City","description":"City code from the package location endpoints. Must belong to `region`, or to `country` when no region is set.","uniqueKey":"ruleset.city.oneOf.1","typeLabel":"null"}],"uniqueKey":"ruleset.city","typeLabel":"string | null"},"isp":{"oneOf":[{"type":"string","title":"Isp","description":"ISP code from the package location endpoints, valid for the chosen country, region and city.","uniqueKey":"ruleset.isp.oneOf.0","typeLabel":"string"},{"type":"null","title":"Isp","description":"ISP code from the package location endpoints, valid for the chosen country, region and city.","uniqueKey":"ruleset.isp.oneOf.1","typeLabel":"null"}],"uniqueKey":"ruleset.isp","typeLabel":"string | null"},"asn":{"oneOf":[{"type":"string","title":"Asn","description":"ASN from the package location endpoints. Requires ASN targeting on your plan.","uniqueKey":"ruleset.asn.oneOf.0","typeLabel":"string"},{"type":"null","title":"Asn","description":"ASN from the package location endpoints. Requires ASN targeting on your plan.","uniqueKey":"ruleset.asn.oneOf.1","typeLabel":"null"}],"uniqueKey":"ruleset.asn","typeLabel":"string | null"},"zip":{"oneOf":[{"type":"string","title":"Zip","description":"ZIP code from the package location endpoints. Requires ZIP targeting on your plan.","uniqueKey":"ruleset.zip.oneOf.0","typeLabel":"string"},{"type":"null","title":"Zip","description":"ZIP code from the package location endpoints. Requires ZIP targeting on your plan.","uniqueKey":"ruleset.zip.oneOf.1","typeLabel":"null"}],"uniqueKey":"ruleset.zip","typeLabel":"string | null"},"lookalike":{"oneOf":[{"type":"boolean","title":"Lookalike","description":"`true` or `false`: whether a replacement node should resemble the previous one (same ISP and location where possible). Defaults to `false` on create. Cannot be `true` with `rotation_trigger: \"bind\"`. On update, omit it to keep the stored value; `null` is rejected (422).","uniqueKey":"ruleset.lookalike.oneOf.0","typeLabel":"boolean"},{"type":"null","title":"Lookalike","description":"`true` or `false`: whether a replacement node should resemble the previous one (same ISP and location where possible). Defaults to `false` on create. Cannot be `true` with `rotation_trigger: \"bind\"`. On update, omit it to keep the stored value; `null` is rejected (422).","uniqueKey":"ruleset.lookalike.oneOf.1","typeLabel":"null"}],"uniqueKey":"ruleset.lookalike","typeLabel":"boolean | null"},"rotation_trigger":{"oneOf":[{"type":"string","title":"Rotation Trigger","description":"When the exit node changes: `timed:\u003cseconds>` (minimum 10), `request-count:\u003crequests>`, `on-error` (only when the node fails) or `bind` (pin the node). Defaults to `timed:300` on create. `bind` cannot be combined with `error_handling: \"replace\"` or `lookalike: true`. On update, omit it to keep the stored value; `null` is rejected (422).","uniqueKey":"ruleset.rotation_trigger.oneOf.0","typeLabel":"string"},{"type":"null","title":"Rotation Trigger","description":"When the exit node changes: `timed:\u003cseconds>` (minimum 10), `request-count:\u003crequests>`, `on-error` (only when the node fails) or `bind` (pin the node). Defaults to `timed:300` on create. `bind` cannot be combined with `error_handling: \"replace\"` or `lookalike: true`. On update, omit it to keep the stored value; `null` is rejected (422).","uniqueKey":"ruleset.rotation_trigger.oneOf.1","typeLabel":"null"}],"uniqueKey":"ruleset.rotation_trigger","typeLabel":"string | null"},"error_handling":{"oneOf":[{"type":"string","title":"Error Handling","description":"What happens when the bound node fails: `replace` (switch to a new node), `retry_\u003cattempts>` (retry on the same node first) or `fail` (return the error). Defaults to `replace` on create, or `retry_3` when `rotation_trigger` is `bind`. On update, omit it to keep the stored value; `null` is rejected (422).","uniqueKey":"ruleset.error_handling.oneOf.0","typeLabel":"string"},{"type":"null","title":"Error Handling","description":"What happens when the bound node fails: `replace` (switch to a new node), `retry_\u003cattempts>` (retry on the same node first) or `fail` (return the error). Defaults to `replace` on create, or `retry_3` when `rotation_trigger` is `bind`. On update, omit it to keep the stored value; `null` is rejected (422).","uniqueKey":"ruleset.error_handling.oneOf.1","typeLabel":"null"}],"uniqueKey":"ruleset.error_handling","typeLabel":"string | null"}},"type":"object","title":"StatefulSessionRequestRulesetSchema","uniqueKey":"ruleset","typeLabel":"StatefulSessionRequestRulesetSchema · object"},"count":{"type":"integer","maximum":1000,"minimum":1,"title":"Count","default":1,"description":"Number of sessions to create, 1 to 1000.","uniqueKey":"count","typeLabel":"integer"}},"type":"object","title":"StatefulSessionCreateRequest","uniqueKey":"","typeLabel":"StatefulSessionCreateRequest · object"},"examples":{"single":{"title":"single","value":{"name":"checkout","ruleset":{"country":"us","region":"california"}}},"batch":{"title":"batch","value":{"name":"w","count":50}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"cfd29a80-c9c0-4702-af70-4f9b2f31caff":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"id":{"type":"string","title":"Id","isRequired":true,"uniqueKey":"data.items.[INDEX].id","typeLabel":"string"},"proxy_id":{"type":"string","title":"Proxy Id","isRequired":true,"uniqueKey":"data.items.[INDEX].proxy_id","typeLabel":"string"},"name":{"type":"string","title":"Name","isRequired":true,"uniqueKey":"data.items.[INDEX].name","typeLabel":"string"},"status":{"type":"string","enum":["enabled","disabled"],"title":"StatefulSessionStatus","description":"`enabled` or `disabled`.","isRequired":true,"uniqueKey":"data.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"ruleset":{"properties":{"network_type":{"oneOf":[{"type":"string","title":"Network Type","description":"`wifi` (residential), `mobile`, or `any`. Must be enabled on the package.","enum":["wifi","mobile","any"],"uniqueKey":"data.items.[INDEX].ruleset.network_type.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","title":"Network Type","description":"`wifi` (residential), `mobile`, or `any`. Must be enabled on the package.","uniqueKey":"data.items.[INDEX].ruleset.network_type.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].ruleset.network_type","typeLabel":"enum\u003cstring> | null"},"country":{"oneOf":[{"type":"string","title":"Country","description":"Two-letter country code, or `any`. Must be available on the package. Required when any of `region`, `city`, `isp`, `asn` or `zip` is set.","uniqueKey":"data.items.[INDEX].ruleset.country.oneOf.0","typeLabel":"string"},{"type":"null","title":"Country","description":"Two-letter country code, or `any`. Must be available on the package. Required when any of `region`, `city`, `isp`, `asn` or `zip` is set.","uniqueKey":"data.items.[INDEX].ruleset.country.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].ruleset.country","typeLabel":"string | null"},"region":{"oneOf":[{"type":"string","title":"Region","description":"Region code from the package location endpoints. Must belong to `country`.","uniqueKey":"data.items.[INDEX].ruleset.region.oneOf.0","typeLabel":"string"},{"type":"null","title":"Region","description":"Region code from the package location endpoints. Must belong to `country`.","uniqueKey":"data.items.[INDEX].ruleset.region.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].ruleset.region","typeLabel":"string | null"},"city":{"oneOf":[{"type":"string","title":"City","description":"City code from the package location endpoints. Must belong to `region`, or to `country` when no region is set.","uniqueKey":"data.items.[INDEX].ruleset.city.oneOf.0","typeLabel":"string"},{"type":"null","title":"City","description":"City code from the package location endpoints. Must belong to `region`, or to `country` when no region is set.","uniqueKey":"data.items.[INDEX].ruleset.city.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].ruleset.city","typeLabel":"string | null"},"isp":{"oneOf":[{"type":"string","title":"Isp","description":"ISP code from the package location endpoints, valid for the chosen country, region and city.","uniqueKey":"data.items.[INDEX].ruleset.isp.oneOf.0","typeLabel":"string"},{"type":"null","title":"Isp","description":"ISP code from the package location endpoints, valid for the chosen country, region and city.","uniqueKey":"data.items.[INDEX].ruleset.isp.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].ruleset.isp","typeLabel":"string | null"},"asn":{"oneOf":[{"type":"string","title":"Asn","description":"ASN from the package location endpoints. Requires ASN targeting on your plan.","uniqueKey":"data.items.[INDEX].ruleset.asn.oneOf.0","typeLabel":"string"},{"type":"null","title":"Asn","description":"ASN from the package location endpoints. Requires ASN targeting on your plan.","uniqueKey":"data.items.[INDEX].ruleset.asn.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].ruleset.asn","typeLabel":"string | null"},"zip":{"oneOf":[{"type":"string","title":"Zip","description":"ZIP code from the package location endpoints. Requires ZIP targeting on your plan.","uniqueKey":"data.items.[INDEX].ruleset.zip.oneOf.0","typeLabel":"string"},{"type":"null","title":"Zip","description":"ZIP code from the package location endpoints. Requires ZIP targeting on your plan.","uniqueKey":"data.items.[INDEX].ruleset.zip.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].ruleset.zip","typeLabel":"string | null"},"lookalike":{"oneOf":[{"type":"boolean","title":"Lookalike","description":"Whether a replacement node should resemble the previous one.","uniqueKey":"data.items.[INDEX].ruleset.lookalike.oneOf.0","typeLabel":"boolean"},{"type":"null","title":"Lookalike","description":"Whether a replacement node should resemble the previous one.","uniqueKey":"data.items.[INDEX].ruleset.lookalike.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].ruleset.lookalike","typeLabel":"boolean | null"},"rotation_trigger":{"oneOf":[{"type":"string","title":"Rotation Trigger","description":"`bind`, `on-error`, `timed:\u003cseconds>` (minimum 10) or `request-count:\u003crequests>`.","uniqueKey":"data.items.[INDEX].ruleset.rotation_trigger.oneOf.0","typeLabel":"string"},{"type":"null","title":"Rotation Trigger","description":"`bind`, `on-error`, `timed:\u003cseconds>` (minimum 10) or `request-count:\u003crequests>`.","uniqueKey":"data.items.[INDEX].ruleset.rotation_trigger.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].ruleset.rotation_trigger","typeLabel":"string | null"},"error_handling":{"oneOf":[{"type":"string","title":"Error Handling","description":"`replace`, `fail` or `retry_\u003cattempts>`.","uniqueKey":"data.items.[INDEX].ruleset.error_handling.oneOf.0","typeLabel":"string"},{"type":"null","title":"Error Handling","description":"`replace`, `fail` or `retry_\u003cattempts>`.","uniqueKey":"data.items.[INDEX].ruleset.error_handling.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].ruleset.error_handling","typeLabel":"string | null"}},"type":"object","title":"StatefulSessionRulesetSchema","description":"The rules you set: what the session is allowed to use.","isRequired":true,"uniqueKey":"data.items.[INDEX].ruleset","typeLabel":"StatefulSessionRulesetSchema · object"},"exit_ip":{"type":"string","title":"Exit Ip","description":"IP address of the exit node the session is bound to now.","isRequired":true,"uniqueKey":"data.items.[INDEX].exit_ip","typeLabel":"string"},"network_type":{"type":"string","title":"Network Type","description":"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.","isRequired":true,"uniqueKey":"data.items.[INDEX].network_type","typeLabel":"string"},"country":{"type":"string","title":"Country","isRequired":true,"uniqueKey":"data.items.[INDEX].country","typeLabel":"string"},"created_at":{"type":"string","format":"date-time","title":"Created At","isRequired":true,"uniqueKey":"data.items.[INDEX].created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"type":"string","format":"date-time","title":"Updated At","isRequired":true,"uniqueKey":"data.items.[INDEX].updated_at","typeLabel":"string\u003cdate-time>"},"region":{"oneOf":[{"type":"string","title":"Region","uniqueKey":"data.items.[INDEX].region.oneOf.0","typeLabel":"string"},{"type":"null","title":"Region","uniqueKey":"data.items.[INDEX].region.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].region","typeLabel":"string | null"},"city":{"oneOf":[{"type":"string","title":"City","uniqueKey":"data.items.[INDEX].city.oneOf.0","typeLabel":"string"},{"type":"null","title":"City","uniqueKey":"data.items.[INDEX].city.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].city","typeLabel":"string | null"},"isp":{"oneOf":[{"type":"string","title":"Isp","uniqueKey":"data.items.[INDEX].isp.oneOf.0","typeLabel":"string"},{"type":"null","title":"Isp","uniqueKey":"data.items.[INDEX].isp.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].isp","typeLabel":"string | null"},"asn":{"oneOf":[{"type":"string","title":"Asn","uniqueKey":"data.items.[INDEX].asn.oneOf.0","typeLabel":"string"},{"type":"null","title":"Asn","uniqueKey":"data.items.[INDEX].asn.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].asn","typeLabel":"string | null"},"zip":{"oneOf":[{"type":"string","title":"Zip","uniqueKey":"data.items.[INDEX].zip.oneOf.0","typeLabel":"string"},{"type":"null","title":"Zip","uniqueKey":"data.items.[INDEX].zip.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].zip","typeLabel":"string | null"},"bound_since":{"oneOf":[{"type":"string","title":"Bound Since","description":"When the session was bound to its current node.","format":"date-time","uniqueKey":"data.items.[INDEX].bound_since.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","title":"Bound Since","description":"When the session was bound to its current node.","uniqueKey":"data.items.[INDEX].bound_since.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].bound_since","typeLabel":"string\u003cdate-time> | null"},"port":{"oneOf":[{"type":"integer","title":"Port","description":"Gateway port to connect to. IP allowlist packages get a dedicated port per session; credential packages share the gateway port.","uniqueKey":"data.items.[INDEX].port.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Port","description":"Gateway port to connect to. IP allowlist packages get a dedicated port per session; credential packages share the gateway port.","uniqueKey":"data.items.[INDEX].port.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].port","typeLabel":"integer | null"},"connection_string":{"oneOf":[{"type":"object","title":"ConnectionStringSchema","description":"How to connect. For credential packages the username is `stateful-\u003cname>` and the password is the package key. For IP allowlist packages `username` and `password` are empty and `uri` is `host:port`.","required":["uri","username","host","port"],"properties":{"uri":{"type":"string","title":"Uri","isRequired":true,"uniqueKey":"data.items.[INDEX].connection_string.oneOf.0.uri","typeLabel":"string"},"username":{"type":"string","title":"Username","isRequired":true,"uniqueKey":"data.items.[INDEX].connection_string.oneOf.0.username","typeLabel":"string"},"host":{"type":"string","title":"Host","isRequired":true,"uniqueKey":"data.items.[INDEX].connection_string.oneOf.0.host","typeLabel":"string"},"port":{"type":"integer","title":"Port","isRequired":true,"uniqueKey":"data.items.[INDEX].connection_string.oneOf.0.port","typeLabel":"integer"},"password":{"oneOf":[{"type":"string","title":"Password","uniqueKey":"data.items.[INDEX].connection_string.oneOf.0.password.oneOf.0","typeLabel":"string"},{"type":"null","title":"Password","uniqueKey":"data.items.[INDEX].connection_string.oneOf.0.password.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].connection_string.oneOf.0.password","typeLabel":"string | null"}},"uniqueKey":"data.items.[INDEX].connection_string.oneOf.0","typeLabel":"ConnectionStringSchema · object"},{"type":"null","description":"How to connect. For credential packages the username is `stateful-\u003cname>` and the password is the package key. For IP allowlist packages `username` and `password` are empty and `uri` is `host:port`.","uniqueKey":"data.items.[INDEX].connection_string.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.items.[INDEX].connection_string","typeLabel":"ConnectionStringSchema · object | null"}},"type":"object","required":["id","proxy_id","name","status","ruleset","exit_ip","network_type","country","created_at","updated_at"],"title":"StatefulSessionResponse","uniqueKey":"data.items.[INDEX]","typeLabel":"StatefulSessionResponse · object"},"type":"array","title":"Data","isRequired":true,"uniqueKey":"data","typeLabel":"StatefulSessionResponse · object[]"},"failed":{"type":"integer","title":"Failed","isRequired":true,"uniqueKey":"failed","typeLabel":"integer"},"reason":{"oneOf":[{"type":"string","title":"Reason","uniqueKey":"reason.oneOf.0","typeLabel":"string"},{"type":"null","title":"Reason","uniqueKey":"reason.oneOf.1","typeLabel":"null"}],"uniqueKey":"reason","typeLabel":"string | null"}},"type":"object","required":["data","failed"],"title":"StatefulSessionCreateResponse","uniqueKey":"","typeLabel":"StatefulSessionCreateResponse · object"},"example":{"data":[{"id":"7c1e9a52-3b4d-4f6a-9e8b-2d5c0a1f6b3e","proxy_id":"b2f0c3d4-e5a6-4b7c-8d9e-0f1a2b3c4d5e","name":"checkout1","status":"enabled","ruleset":{"network_type":"wifi","country":"us","region":"california","city":null,"isp":null,"asn":null,"zip":null,"lookalike":false,"rotation_trigger":"timed:300","error_handling":"replace"},"exit_ip":"203.0.113.42","network_type":"wifi","country":"us","region":"california","city":"los_angeles","isp":"charter_communications","asn":"20001","zip":null,"bound_since":"2026-10-27T10:15:04Z","port":1337,"created_at":"2026-10-27T10:15:03Z","updated_at":"2026-10-27T10:15:04Z","connection_string":{"uri":"stateful-checkout1:aB3dE5fG7h@proxy.soax.com:1337","username":"stateful-checkout1","password":"aB3dE5fG7h","host":"proxy.soax.com","port":1337}}],"failed":0,"reason":null},"examples":{"Example":{"title":"Example","value":{"data":[{"id":"7c1e9a52-3b4d-4f6a-9e8b-2d5c0a1f6b3e","proxy_id":"b2f0c3d4-e5a6-4b7c-8d9e-0f1a2b3c4d5e","name":"checkout1","status":"enabled","ruleset":{"network_type":"wifi","country":"us","region":"california","city":null,"isp":null,"asn":null,"zip":null,"lookalike":false,"rotation_trigger":"timed:300","error_handling":"replace"},"exit_ip":"203.0.113.42","network_type":"wifi","country":"us","region":"california","city":"los_angeles","isp":"charter_communications","asn":"20001","zip":null,"bound_since":"2026-10-27T10:15:04Z","port":1337,"created_at":"2026-10-27T10:15:03Z","updated_at":"2026-10-27T10:15:04Z","connection_string":{"uri":"stateful-checkout1:aB3dE5fG7h@proxy.soax.com:1337","username":"stateful-checkout1","password":"aB3dE5fG7h","host":"proxy.soax.com","port":1337}}],"failed":0,"reason":null}}},"exampleType":"examples"}},"exampleType":"examples"},"7e62bc51-e5dd-4631-b0ec-aaa1db64d57d":{"description":"Invalid name or ruleset, session limit reached, stateful sessions disabled on the package, or the package is suspended.","content":{"application/json":{"example":{"detail":"Creating 50 session(s) would exceed limit of 1000. Current: 980."},"examples":{"Example":{"title":"Example","value":{"detail":"Creating 50 session(s) would exceed limit of 1000. Current: 980."}}},"exampleType":"examples"}},"exampleType":"examples"},"83e244db-adb1-4339-a68c-ec0cac18d115":{"description":"Missing, invalid, or revoked API key.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string","uniqueKey":"detail","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"detail":"Invalid API key"},"examples":{"Example":{"title":"Example","value":{"detail":"Invalid API key"}}},"exampleType":"examples"}},"exampleType":"examples"},"ddd221ed-d2c0-4815-ad7e-6985d6a09b73":{"description":"The API key does not carry the scope this endpoint requires.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string","uniqueKey":"detail","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"detail":"Missing required scope: proxy:packages:write"},"examples":{"Example":{"title":"Example","value":{"detail":"Missing required scope: proxy:packages:write"}}},"exampleType":"examples"}},"exampleType":"examples"},"a50d6a00-c358-4f73-99b3-2bfe44f1e8a3":{"description":"The resource does not exist, belongs to another organization, or is outside the API key's package restriction.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string","uniqueKey":"detail","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"detail":"Package not found"},"examples":{"Example":{"title":"Example","value":{"detail":"Package not found"}}},"exampleType":"examples"}},"exampleType":"examples"},"98623c3e-3f1d-4f73-ae64-d6bb8f153c39":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"oneOf":[{"type":"string","uniqueKey":"detail.items.[INDEX].loc.items.[INDEX].oneOf.0","typeLabel":"string"},{"type":"integer","uniqueKey":"detail.items.[INDEX].loc.items.[INDEX].oneOf.1","typeLabel":"integer"}],"uniqueKey":"detail.items.[INDEX].loc.items.[INDEX]","typeLabel":"string | integer"},"type":"array","title":"Location","isRequired":true,"uniqueKey":"detail.items.[INDEX].loc","typeLabel":"(string | integer)[]"},"msg":{"type":"string","title":"Message","isRequired":true,"uniqueKey":"detail.items.[INDEX].msg","typeLabel":"string"},"type":{"type":"string","title":"Error Type","isRequired":true,"uniqueKey":"detail.items.[INDEX].type","typeLabel":"string"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError","uniqueKey":"detail.items.[INDEX]","typeLabel":"ValidationError · object"},"type":"array","title":"Detail","uniqueKey":"detail","typeLabel":"ValidationError · object[]"}},"type":"object","title":"HTTPValidationError","uniqueKey":"","typeLabel":"HTTPValidationError · object"},"examples":{"Example":{"title":"Example","value":{"detail":[{"loc":["\u003cstring>"],"msg":"\u003cstring>","type":"\u003cstring>"}]}}},"exampleType":"generated"}},"exampleType":"generated"},"07b9f82a-650c-41df-b650-54064ab01303":{"description":"Another create for this package is still in progress, or the API key's rate limit was exceeded (5 requests/second per API key, 500 requests/minute per IP). Wait `Retry-After` seconds where present and retry.","content":{"application/json":{"example":{"detail":"Too Many Requests"},"examples":{"Example":{"title":"Example","value":{"detail":"Too Many Requests"}}},"exampleType":"examples"}},"exampleType":"examples"},"c91b8bb7-dd7c-420b-91ed-be14121496e5":{"description":"Every requested session failed with an unexpected error. Nothing was created.","content":{"application/json":{"example":{"detail":"None of the 1 requested sessions could be assigned a node; no sessions were created."},"examples":{"Example":{"title":"Example","value":{"detail":"None of the 1 requested sessions could be assigned a node; no sessions were created."}}},"exampleType":"examples"}},"exampleType":"examples"},"4facf435-80a6-45d7-be80-9f04407eea93":{"description":"No exit node matched the ruleset for any requested session. Nothing was created. Retry after the `Retry-After` delay, or broaden the ruleset.","content":{"application/json":{"example":{"detail":"None of the 1 requested sessions could be assigned a node; no sessions were created."},"examples":{"Example":{"title":"Example","value":{"detail":"None of the 1 requested sessions could be assigned a node; no sessions were created."}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"82a1fae4-d039-4b2f-ad57-104d7467f72b":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key secret (starts with `s_live_`). Create keys in the dashboard under **Settings → API keys**, or via `POST /v1/api-keys/`. Send it as `Authorization: Bearer \u003csecret>`.","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"06663dcd-10ca-4caf-88d2-0c3b470373f4":{"url":"https://api.platform.soax.com"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"API key secret (starts with `s_live_`). Create keys in the dashboard under **Settings → API keys**, or via `POST /v1/api-keys/`. Send it as `Authorization: Bearer \u003csecret>`.","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"API key secret (starts with `s_live_`). Create keys in the dashboard under **Settings → API keys**, or via `POST /v1/api-keys/`. Send it as `Authorization: Bearer \u003csecret>`.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"api/openapi.json"},"subdomain":"soax","siteName":"SOAX","title":"Create stateful sessions - SOAX","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-04T16:24:06.265Z","originalFileLocation":"api/stateful-sessions/create.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Create one or more stateful sessions on a package. Each session is bound to a matching exit node before the response returns, so you get its exit IP and connection string straight away. The ruleset is optional: omit it or send {} to use the defaults (lookalike: false, rotation_trigger: \u0026quot;timed:300\u0026quot;, error_handling: \u0026quot;replace\u0026quot;). With count \u0026gt; 1, each session gets the base name plus a number (job gives job1, job2, …). Node assignment is per session. A session that cannot be bound is discarded, so the response can hold fewer sessions than you asked for: check failed and reason. If none could be bound, the request fails with 503 and a Retry-After header. Creates for the same package run one at a time; an overlapping create may get 429. Requires the proxy:packages:write scope.\">\u003cmeta data-mint-head name=\"application-name\" content=\"SOAX\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/soax/xEvn0n-A8DsILfj7/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/soax/xEvn0n-A8DsILfj7/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/soax/xEvn0n-A8DsILfj7/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/soax/xEvn0n-A8DsILfj7/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/soax/xEvn0n-A8DsILfj7/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/soax/xEvn0n-A8DsILfj7/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/soax/xEvn0n-A8DsILfj7/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/soax/xEvn0n-A8DsILfj7/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/soax/xEvn0n-A8DsILfj7/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create stateful sessions - SOAX\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create one or more stateful sessions on a package. Each session is bound to a matching exit node before the response returns, so you get its exit IP and connection string straight away. The ruleset is optional: omit it or send {} to use the defaults (lookalike: false, rotation_trigger: \u0026quot;timed:300\u0026quot;, error_handling: \u0026quot;replace\u0026quot;). With count \u0026gt; 1, each session gets the base name plus a number (job gives job1, job2, …). Node assignment is per session. A session that cannot be bound is discarded, so the response can hold fewer sessions than you asked for: check failed and reason. If none could be bound, the request fails with 503 and a Retry-After header. Creates for the same package run one at a time; an overlapping create may get 429. Requires the proxy:packages:write scope.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"SOAX\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://developers.soax.com/api/stateful-sessions/create\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://soax.mintlify.app/_mintlify/api/og/v2?division=Stateful+Sessions\u0026amp;title=Create+stateful+sessions\u0026amp;description=Create+one+or+more+stateful+sessions+on+a+package.+Each+session+is+bound+to+a+matching+exit+node+before+the+response+returns%2C+so+you+get+its+exit+IP+and+connect\u0026amp;theme=44f3ae9b74b0cebb564095b1\u0026amp;signature=da7ab9239fae720bf77150548a1161920d721e7aba3ddacf3ee792c982e80166\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create stateful sessions - SOAX\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create one or more stateful sessions on a package. Each session is bound to a matching exit node before the response returns, so you get its exit IP and connection string straight away. The ruleset is optional: omit it or send {} to use the defaults (lookalike: false, rotation_trigger: \u0026quot;timed:300\u0026quot;, error_handling: \u0026quot;replace\u0026quot;). With count \u0026gt; 1, each session gets the base name plus a number (job gives job1, job2, …). Node assignment is per session. A session that cannot be bound is discarded, so the response can hold fewer sessions than you asked for: check failed and reason. If none could be bound, the request fails with 503 and a Retry-After header. Creates for the same package run one at a time; an overlapping create may get 429. Requires the proxy:packages:write scope.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://soax.mintlify.app/_mintlify/api/og/v2?division=Stateful+Sessions\u0026amp;title=Create+stateful+sessions\u0026amp;description=Create+one+or+more+stateful+sessions+on+a+package.+Each+session+is+bound+to+a+matching+exit+node+before+the+response+returns%2C+so+you+get+its+exit+IP+and+connect\u0026amp;theme=44f3ae9b74b0cebb564095b1\u0026amp;signature=da7ab9239fae720bf77150548a1161920d721e7aba3ddacf3ee792c982e80166\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/soax/xEvn0n-A8DsILfj7/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"SOAX\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#10b77f\">\u003clink data-mint-head rel=\"canonical\" href=\"https://developers.soax.com/api/stateful-sessions/create\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api/stateful-sessions/create.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://developers.soax.com/#organization\",\"name\":\"SOAX\",\"url\":\"https://developers.soax.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/soax/x2dnBPUF6XiNROo6/logo/logo-wide-black.svg?fit=max\u0026auto=format\u0026n=x2dnBPUF6XiNROo6\u0026q=85\u0026s=8e1801c906e292ef153e926f6a0eb1f2\"}},{\"@type\":\"WebSite\",\"@id\":\"https://developers.soax.com#website\",\"name\":\"SOAX\",\"url\":\"https://developers.soax.com\",\"publisher\":{\"@id\":\"https://developers.soax.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://developers.soax.com/api/stateful-sessions/create#webpage\",\"url\":\"https://developers.soax.com/api/stateful-sessions/create\",\"name\":\"Create stateful sessions\",\"description\":\"Create one or more stateful sessions on a package. Each session is bound to a matching exit node before the response returns, so you get its exit IP and connection string straight away. The ruleset is optional: omit it or send {} to use the defaults (lookalike: false, rotation_trigger: \\\"timed:300\\\", error_handling: \\\"replace\\\"). With count > 1, each session gets the base name plus a number (job gives job1, job2, …). Node assignment is per session. A session that cannot be bound is discarded, so the response can hold fewer sessions than you asked for: check failed and reason. If none could be bound, the request fails with 503 and a Retry-After header. Creates for the same package run one at a time; an overlapping create may get 429. Requires the proxy:packages:write scope.\",\"dateModified\":\"2026-11-04T16:24:06.265Z\",\"isPartOf\":{\"@id\":\"https://developers.soax.com#website\"},\"breadcrumb\":{\"@id\":\"https://developers.soax.com/api/stateful-sessions/create#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://developers.soax.com/api/stateful-sessions/create#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API Reference\",\"item\":\"https://developers.soax.com/api/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create stateful sessions\",\"item\":\"https://developers.soax.com/api/stateful-sessions/create\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://developers.soax.com/api/stateful-sessions/create#apireference\",\"headline\":\"Create stateful sessions\",\"name\":\"Create stateful sessions\",\"description\":\"Create one or more stateful sessions on a package. Each session is bound to a matching exit node before the response returns, so you get its exit IP and connection string straight away. The ruleset is optional: omit it or send {} to use the defaults (lookalike: false, rotation_trigger: \\\"timed:300\\\", error_handling: \\\"replace\\\"). With count > 1, each session gets the base name plus a number (job gives job1, job2, …). Node assignment is per session. A session that cannot be bound is discarded, so the response can hold fewer sessions than you asked for: check failed and reason. If none could be bound, the request fails with 503 and a Retry-After header. Creates for the same package run one at a time; an overlapping create may get 429. Requires the proxy:packages:write scope.\",\"url\":\"https://developers.soax.com/api/stateful-sessions/create\",\"mainEntityOfPage\":{\"@id\":\"https://developers.soax.com/api/stateful-sessions/create#webpage\"},\"dateModified\":\"2026-11-04T16:24:06.265Z\",\"publisher\":{\"@id\":\"https://developers.soax.com/#organization\"},\"isPartOf\":{\"@id\":\"https://developers.soax.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"SOAX\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"SOAX","nav":{"global":null,"groups":[{"group":"Getting Started","pages":[{"title":"What is SOAX","href":"/getting-started/what-is-soax"},{"title":"Quickstart","href":"/getting-started/quickstart"},{"title":"Core Concepts","href":"/getting-started/core-concepts"},{"title":"Choosing the Right Proxy Type","href":"/getting-started/choosing-proxy-type"},{"title":"Authentication","href":"/getting-started/authentication"}]},{"group":"Proxies","pages":[{"title":"Residential Proxies","href":"/proxies/residential"},{"title":"Mobile Proxies","href":"/proxies/mobile"},{"title":"Stateful Sessions","href":"/proxies/stateful-sessions"}]},{"group":"Dashboard","pages":[{"title":"Quick Connect","href":"/dashboard/quick-connect"},{"title":"Package Management","href":"/dashboard/package-management"},{"title":"Usage Analytics","href":"/dashboard/usage-analytics"},{"title":"Account \u0026 Billing","href":"/dashboard/account-billing"}]},{"group":"Trust \u0026 Safety","pages":[{"title":"Responsible web access","href":"/trust/responsible-web-access"},{"title":"Customer screening \u0026 verification","href":"/trust/customer-screening"},{"title":"Access restrictions","href":"/trust/access-restrictions"},{"title":"Requesting additional access","href":"/trust/additional-access"},{"title":"Network sourcing \u0026 consent","href":"/trust/network-sourcing"},{"title":"Acceptable use \u0026 abuse response","href":"/trust/acceptable-use"}]},{"group":"API Reference","pages":[{"title":"API overview","href":"/api/overview"},{"title":"API quickstart","href":"/api/quickstart"},{"title":"API authentication","href":"/api/authentication"},{"title":"Error handling","href":"/api/errors"},{"title":"Rate limits","href":"/api/rate-limits"},{"group":"API Keys","pages":[{"title":"Get current API key","openapi":"api/openapi.json GET /v1/api-keys/me","href":"/api/keys/me"},{"title":"List API keys","openapi":"api/openapi.json GET /v1/api-keys/","href":"/api/keys/list"},{"title":"Create an API key","openapi":"api/openapi.json POST /v1/api-keys/","href":"/api/keys/create"},{"title":"Revoke an API key","openapi":"api/openapi.json DELETE /v1/api-keys/{key_id}","href":"/api/keys/revoke"}]},{"group":"Packages","pages":[{"title":"List packages","openapi":"api/openapi.json GET /v1/proxy/packages","href":"/api/packages/list"},{"title":"Get a package","openapi":"api/openapi.json GET /v1/proxy/packages/{package_id}","href":"/api/packages/get"},{"title":"Get connection strings","openapi":"api/openapi.json GET /v1/proxy/packages/{package_id}/connection-string","href":"/api/packages/connection-string"},{"title":"Rotate package password","openapi":"api/openapi.json POST /v1/proxy/packages/{package_id}/rotate-password","description":"Generate a new package password (the 10-character key used to authenticate proxy requests — not the API key). The old password stops working immediately, so update every client that connects through this package. The new plaintext password is returned only in this response.\n\nReturns 400 if the package is deleted or suspended.\n\nRequires the `proxy:packages:write` scope.","href":"/api/packages/rotate-password"}]},{"group":"Stateful Sessions","pages":[{"title":"Create stateful sessions","openapi":"api/openapi.json POST /v1/proxy/packages/{package_id}/stateful-sessions","href":"/api/stateful-sessions/create"},{"title":"List stateful sessions","openapi":"api/openapi.json GET /v1/proxy/packages/{package_id}/stateful-sessions","description":"List the sessions on a package, newest first, with cursor pagination. Each page returns `has_more` and `next_cursor`; pass `next_cursor` as `cursor` to get the next page. Deleted sessions are never listed.\n\nRequires the `proxy:packages:read` scope.","href":"/api/stateful-sessions/list"},{"title":"Get a stateful session","openapi":"api/openapi.json GET /v1/proxy/packages/{package_id}/stateful-sessions/{session_id}","href":"/api/stateful-sessions/get"},{"title":"Update a stateful session","openapi":"api/openapi.json PATCH /v1/proxy/packages/{package_id}/stateful-sessions/{session_id}","href":"/api/stateful-sessions/update"},{"title":"Rotate a stateful session","openapi":"api/openapi.json POST /v1/proxy/packages/{package_id}/stateful-sessions/{session_id}/rotate","href":"/api/stateful-sessions/rotate"},{"title":"Delete a stateful session","openapi":"api/openapi.json DELETE /v1/proxy/packages/{package_id}/stateful-sessions/{session_id}","href":"/api/stateful-sessions/delete"},{"title":"Delete stateful sessions in bulk","openapi":"api/openapi.json POST /v1/proxy/packages/{package_id}/stateful-sessions/delete","href":"/api/stateful-sessions/bulk-delete"}]},{"group":"Locations","pages":[{"title":"List proxy tiers","openapi":"api/openapi.json GET /v1/proxy/locations/tiers","href":"/api/locations/tiers"},{"title":"List proxy countries","openapi":"api/openapi.json GET /v1/proxy/locations/countries","href":"/api/locations/countries"},{"title":"List package countries","openapi":"api/openapi.json GET /v1/proxy/packages/{package_id}/locations/countries","href":"/api/locations/package-countries"},{"title":"List package regions","openapi":"api/openapi.json GET /v1/proxy/packages/{package_id}/locations/countries/{cc}/regions","href":"/api/locations/package-regions"},{"title":"List package cities","openapi":"api/openapi.json GET /v1/proxy/packages/{package_id}/locations/countries/{cc}/cities","href":"/api/locations/package-cities"},{"title":"List package ISPs","openapi":"api/openapi.json GET /v1/proxy/packages/{package_id}/locations/countries/{cc}/isps","href":"/api/locations/package-isps"},{"title":"List package ASNs","openapi":"api/openapi.json GET /v1/proxy/packages/{package_id}/locations/countries/{cc}/asns","href":"/api/locations/package-asns"},{"title":"List package ZIP codes","openapi":"api/openapi.json GET /v1/proxy/packages/{package_id}/locations/countries/{cc}/zip-codes","href":"/api/locations/package-zip-codes"}]},{"group":"Account","pages":[{"title":"Get account","openapi":"api/openapi.json GET /v1/account","href":"/api/account/get"},{"title":"List credit blocks","openapi":"api/openapi.json GET /v1/account/credits","href":"/api/account/credits"},{"title":"Get subscription","openapi":"api/openapi.json GET /v1/account/subscription","href":"/api/account/subscription"}]},{"group":"Analytics","pages":[{"title":"Usage summary","openapi":"api/openapi.json POST /v1/proxy/analytics/summary","href":"/api/analytics/summary"},{"title":"Traffic breakdown","openapi":"api/openapi.json POST /v1/proxy/analytics/traffic","href":"/api/analytics/traffic"},{"title":"Credits burned","openapi":"api/openapi.json POST /v1/proxy/analytics/credits-burned","href":"/api/analytics/credits-burned"}]}]},{"group":"Code Examples","pages":[{"title":"Python","href":"/examples/python"},{"title":"Node.js","href":"/examples/nodejs"},{"title":"Go","href":"/examples/go"},{"title":"curl","href":"/examples/curl"},{"group":"Advanced","pages":[{"title":"Advanced: Multi-Geo Monitoring in Go","href":"/examples/advanced/multi-geo-go"}]}]},{"group":"Troubleshooting","pages":[{"title":"Error Codes \u0026 Fixes","href":"/troubleshooting/error-codes"},{"title":"Connection Debugging","href":"/troubleshooting/connection-debugging"},{"title":"CAPTCHA \u0026 Ban Rates","href":"/troubleshooting/captcha-ban-rates"},{"title":"Proxy Speed \u0026 Latency","href":"/troubleshooting/proxy-speed-latency"},{"title":"IP Quality \u0026 Fraud Score","href":"/troubleshooting/ip-quality-fraud-score"},{"title":"Account Bans \u0026 Protection","href":"/troubleshooting/account-bans-protection"},{"title":"FAQ","href":"/troubleshooting/faq"}]}]},"basePath":"","title":"Create stateful sessions - SOAX","buildId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","deploymentId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DX1Meug0.js","utils-B_OMIQVC.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-ChxhRPMa.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-CuKvD8Iv.js","snippetPresets-C5d7p2hp.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CfHcE8m4.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C1zZV314.js","shallow-CmQhqCJn.js","getApiPlaygroundDisplay-YRo9s1O7.js","CodeSnippet-RN1MTdfk.js","CodeSnippets-DKLPHxJA.js","Page-BAvA99GL.js","getPastedJson-bz0M41mU.js","icon-CsmhpPrv.js","MethodPill-CNGsVE77.js","DuplicateIcon-DilfU_Z2.js","createIcon-BdsYzQck.js","DynamicMarkdown-CbqEDjbV.js","SectionHeading-O6hXpFCN.js","axios-vUo_bRtp.js","Markdown-nKm-uidQ.js","clsx-ClVdStUn.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CIQkMg3R.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-ImrFS4Fy.js"]}