---
title: "List stateful sessions"
method: GET
path: "/v1/proxy/packages/{package_id}/stateful-sessions"
tags: ["Stateful Sessions"]
---

# List stateful sessions

`GET /v1/proxy/packages/{package_id}/stateful-sessions`

## Request

- Base URL: `https://api.platform.soax.com`
- URL: `https://api.platform.soax.com/v1/proxy/packages/{package_id}/stateful-sessions`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/soax/apis/soax-api/docs/v1/proxy/packages/:package_id/stateful-sessions/get.ts> (a function with typed inputs; its response is checked against the schema)

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.

Requires the `proxy:packages:read` scope.

## Path parameters

- `package_id` string, required: The ID of the proxy package (UUID format)

## Query parameters

- `cursor` string, nullable
- `limit` integer
- `status` 'enabled' | 'disabled'
- `search` string, nullable: Case-insensitive search. Digits only match a session whose port starts with them (`200` finds ports 2000-2009, not 3200) or whose name contains them; any other text matches a session whose ID or name contains it.

## Response `200`

Successful Response

- StatefulSessionsListResponse
  - `data` StatefulSessionResponse[], required
    - `id` string, required
    - `proxy_id` string, required
    - `name` string, required
    - `status` 'enabled' | 'disabled', required
    - `ruleset` StatefulSessionRulesetSchema, required
      - `network_type` 'wifi' | 'mobile' | 'any', nullable: `wifi` (residential), `mobile`, or `any`. Must be enabled on the package.
      - `country` string, nullable: Two-letter country code, or `any`. Must be available on the package. Required when any of `region`, `city`, `isp`, `asn` or `zip` is set.
      - `region` string, nullable: Region code from the package location endpoints. Must belong to `country`.
      - `city` string, nullable: City code from the package location endpoints. Must belong to `region`, or to `country` when no region is set.
      - `isp` string, nullable: ISP code from the package location endpoints, valid for the chosen country, region and city.
      - `asn` string, nullable: ASN from the package location endpoints. Requires ASN targeting on your plan.
      - `zip` string, nullable: ZIP code from the package location endpoints. Requires ZIP targeting on your plan.
      - `lookalike` boolean, nullable: Whether a replacement node should resemble the previous one.
      - `rotation_trigger` string, nullable: `bind`, `on-error`, `timed:<seconds>` (minimum 10) or `request-count:<requests>`.
      - `error_handling` string, nullable: `replace`, `fail` or `retry_<attempts>`.
    - `exit_ip` string, required: IP address of the exit node the session is bound to now.
    - `network_type` string, 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.
    - `country` string, required
    - `region` string, nullable
    - `city` string, nullable
    - `isp` string, nullable
    - `asn` string, nullable
    - `zip` string, nullable
    - `bound_since` string, date-time, nullable: When the session was bound to its current node.
    - `port` integer, nullable: Gateway port to connect to. IP allowlist packages get a dedicated port per session; credential packages share the gateway port.
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
    - `connection_string` ConnectionStringSchema
      - `uri` string, required
      - `username` string, required
      - `password` string, nullable
      - `host` string, required
      - `port` integer, required
  - `has_more` boolean, required: Whether another page exists.
  - `next_cursor` string, nullable: Pass as `cursor` to fetch the next page. `null` on the last page.

## Other responses

- `401`: Missing, invalid, or revoked API key.
- `403`: The API key does not carry the scope this endpoint requires.
- `404`: The resource does not exist, belongs to another organization, or is outside the API key's package restriction.
- `422`: Validation Error
- `429`: Rate limit exceeded (5 requests/second per API key, 500 requests/minute per IP). The response includes `Retry-After` (seconds), `RateLimit-Limit`, `RateLimit-Remaining`, and `RateLimit-Reset` (Unix time) headers — wait `Retry-After` seconds and retry.

---

[API](https://skmtc.dev/soax/apis/soax-api.md) - [All operations](https://skmtc.dev/soax/apis/soax-api/llms.txt) - [OpenAPI document](https://skmtc.dev/soax/apis/soax-api/revisions/2abdaa934277?raw)
