> ## Documentation Index
> Fetch the complete documentation index at: https://developers.soax.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List stateful sessions

> 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.



## OpenAPI

````yaml api/openapi.json GET /v1/proxy/packages/{package_id}/stateful-sessions
openapi: 3.1.0
info:
  title: SOAX API
  version: v1
  description: >-
    Programmatic access to your SOAX account: manage proxy packages, generate
    connection strings, browse available locations, pull usage analytics, and
    manage API keys. All endpoints are served over HTTPS and return JSON.
servers:
  - url: https://api.platform.soax.com
security:
  - bearerAuth: []
tags:
  - name: API Keys
    description: >-
      Self-service management of the API keys used to authenticate with this
      API.
  - name: Packages
    description: >-
      Read proxy packages, build proxy connection strings, and rotate package
      passwords.
  - name: Stateful Sessions
    description: Create and manage long-lived, server-configured proxy sessions.
  - name: Locations
    description: >-
      Location reference data: tiers, countries, regions, cities, ISPs, ASNs,
      and ZIP codes.
  - name: Account
    description: Read-only account, credit, and subscription information.
  - name: Analytics
    description: Usage analytics for your proxy packages.
paths:
  /v1/proxy/packages/{package_id}/stateful-sessions:
    get:
      tags:
        - Stateful Sessions
      summary: List 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.


        Requires the `proxy:packages:read` scope.
      operationId: >-
        list_stateful_sessions_v1_proxy_packages__package_id__stateful_sessions_get
      parameters:
        - 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
          description: The ID of the proxy package (UUID format)
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Cursor
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 20
            title: Limit
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/StatefulSessionStatus'
              - type: 'null'
            title: Status
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              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.
            title: Search
          description: >-
            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.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatefulSessionsListResponse'
              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
                has_more: false
                next_cursor: null
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: The API key does not carry the scope this endpoint requires.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
              example:
                detail: 'Missing required scope: proxy:packages:read'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    StatefulSessionStatus:
      type: string
      enum:
        - enabled
        - disabled
      title: StatefulSessionStatus
    StatefulSessionsListResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/StatefulSessionResponse'
          type: array
          title: Data
        has_more:
          type: boolean
          title: Has More
          description: Whether another page exists.
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
          description: Pass as `cursor` to fetch the next page. `null` on the last page.
      type: object
      required:
        - data
        - has_more
      title: StatefulSessionsListResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    StatefulSessionResponse:
      properties:
        id:
          type: string
          title: Id
        proxy_id:
          type: string
          title: Proxy Id
        name:
          type: string
          title: Name
        status:
          $ref: '#/components/schemas/StatefulSessionStatus'
          description: '`enabled` or `disabled`.'
        ruleset:
          $ref: '#/components/schemas/StatefulSessionRulesetSchema'
          description: 'The rules you set: what the session is allowed to use.'
        exit_ip:
          type: string
          title: Exit Ip
          description: IP address of the exit node the session is bound to now.
        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.
        country:
          type: string
          title: Country
        region:
          anyOf:
            - type: string
            - type: 'null'
          title: Region
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
        isp:
          anyOf:
            - type: string
            - type: 'null'
          title: Isp
        asn:
          anyOf:
            - type: string
            - type: 'null'
          title: Asn
        zip:
          anyOf:
            - type: string
            - type: 'null'
          title: Zip
        bound_since:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Bound Since
          description: When the session was bound to its current node.
        port:
          anyOf:
            - type: 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.
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        connection_string:
          anyOf:
            - $ref: '#/components/schemas/ConnectionStringSchema'
            - type: 'null'
          description: >-
            How to connect. For credential packages the username is
            `stateful-<name>` and the password is the package key. For IP
            allowlist packages `username` and `password` are empty and `uri` is
            `host:port`.
      type: object
      required:
        - id
        - proxy_id
        - name
        - status
        - ruleset
        - exit_ip
        - network_type
        - country
        - created_at
        - updated_at
      title: StatefulSessionResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    StatefulSessionRulesetSchema:
      properties:
        network_type:
          anyOf:
            - type: string
              enum:
                - wifi
                - mobile
                - any
            - type: 'null'
          title: Network Type
          description: >-
            `wifi` (residential), `mobile`, or `any`. Must be enabled on the
            package.
        country:
          anyOf:
            - type: 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.
        region:
          anyOf:
            - type: string
            - type: 'null'
          title: Region
          description: >-
            Region code from the package location endpoints. Must belong to
            `country`.
        city:
          anyOf:
            - type: 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.
        isp:
          anyOf:
            - type: string
            - type: 'null'
          title: Isp
          description: >-
            ISP code from the package location endpoints, valid for the chosen
            country, region and city.
        asn:
          anyOf:
            - type: string
            - type: 'null'
          title: Asn
          description: >-
            ASN from the package location endpoints. Requires ASN targeting on
            your plan.
        zip:
          anyOf:
            - type: string
            - type: 'null'
          title: Zip
          description: >-
            ZIP code from the package location endpoints. Requires ZIP targeting
            on your plan.
        lookalike:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Lookalike
          description: Whether a replacement node should resemble the previous one.
        rotation_trigger:
          anyOf:
            - type: string
            - type: 'null'
          title: Rotation Trigger
          description: >-
            `bind`, `on-error`, `timed:<seconds>` (minimum 10) or
            `request-count:<requests>`.
        error_handling:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Handling
          description: '`replace`, `fail` or `retry_<attempts>`.'
      type: object
      title: StatefulSessionRulesetSchema
    ConnectionStringSchema:
      properties:
        uri:
          type: string
          title: Uri
        username:
          type: string
          title: Username
        password:
          anyOf:
            - type: string
            - type: 'null'
          title: Password
        host:
          type: string
          title: Host
        port:
          type: integer
          title: Port
      type: object
      required:
        - uri
        - username
        - host
        - port
      title: ConnectionStringSchema
  responses:
    Unauthorized:
      description: Missing, invalid, or revoked API key.
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
          example:
            detail: Invalid API key
    NotFound:
      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
          example:
            detail: Package not found
    RateLimited:
      description: >-
        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.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
          example:
            error: 'Rate limit exceeded: 5 per 1 second'
  securitySchemes:
    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 <secret>`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.