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

# Regenerate rotation link

> Replace the session's rotation link (`rotation_url`). The previous link answers 404 from this moment. Nothing else changes, and the session is not rotated. Returns 404 when rotation links are disabled.

Requires the `proxy:packages:write` scope.



## OpenAPI

````yaml api/openapi.json POST /v1/proxy/packages/{package_id}/stateful-sessions/{session_id}/rotation-url
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/{session_id}/rotation-url:
    post:
      tags:
        - Stateful Sessions
      summary: Regenerate rotation link
      description: >-
        Replace the session's rotation link (`rotation_url`). The previous link
        answers 404 from this moment. Nothing else changes, and the session is
        not rotated. Returns 404 when rotation links are disabled.


        Requires the `proxy:packages:write` scope.
      operationId: >-
        regenerate_stateful_session_rotation_url_v1_proxy_packages__package_id__stateful_sessions__session_id__rotation_url_post
      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 package's ID. To find it, open the package in
              [Packages](https://platform.soax.com/packages) and expand the
              header, or call [List packages](/api/packages/list).
            title: Package Id
          description: >-
            The package's ID. To find it, open the package in
            [Packages](https://platform.soax.com/packages) and expand the
            header, or call [List packages](/api/packages/list).
        - name: session_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 session's `id` (a UUID), not its name. In the dashboard,
              expand the session row to copy it.
            title: Session Id
          description: >-
            The session's `id` (a UUID), not its name. In the dashboard, expand
            the session row to copy it.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatefulSessionResponse'
              example:
                id: 7c1e9a52-3b4d-4f6a-9e8b-2d5c0a1f6b3e
                proxy_id: b2f0c3d4-e5a6-4b7c-8d9e-0f1a2b3c4d5e
                name: checkout1
                status: enabled
                placement_region: eu
                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: 198.51.100.17
                network_type: wifi
                country: us
                region: california
                city: los_angeles
                isp: charter_communications
                asn: '20001'
                zip: null
                bound_since: '2026-10-27T10:21:40Z'
                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
                rotation_url: >-
                  https://api.platform.soax.com/v1/proxy/packages/b2f0c3d4-e5a6-4b7c-8d9e-0f1a2b3c4d5e/stateful-sessions/7c1e9a52-3b4d-4f6a-9e8b-2d5c0a1f6b3e/rotate?token=Nw3t9Ld6hYc7
        '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:write'
        '404':
          description: Session not found, or outside the API key's package restriction.
          content:
            application/json:
              example:
                detail: Session not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    StatefulSessionResponse:
      properties:
        id:
          type: string
          title: Id
          description: Session ID, a UUID. Use it as `session_id` in API calls.
        proxy_id:
          type: string
          title: Proxy Id
        name:
          type: string
          title: Name
          description: >-
            Session name. Forms the username `stateful-<name>`. Not accepted as
            `session_id`.
        status:
          $ref: '#/components/schemas/StatefulSessionStatus'
          description: '`enabled` or `disabled`.'
        placement_region:
          $ref: '#/components/schemas/PlacementRegion'
          description: Where SOAX hosts the session, set at creation.
        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 password. For IP
            allowlist packages `username` and `password` are empty and `uri` is
            `host:port`.
        rotation_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Rotation Url
          description: >-
            The session's rotation link: open it with a GET to rotate the
            session, no API key needed. It is a secret, so share it only with
            the tool that uses it. `null` when rotation links are disabled.
            Replace it with [Regenerate rotation
            link](/api/stateful-sessions/rotation-url).
      type: object
      required:
        - id
        - proxy_id
        - name
        - status
        - placement_region
        - ruleset
        - exit_ip
        - network_type
        - country
        - created_at
        - updated_at
      title: StatefulSessionResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    StatefulSessionStatus:
      type: string
      enum:
        - enabled
        - disabled
      title: StatefulSessionStatus
    PlacementRegion:
      type: string
      enum:
        - eu
        - na
        - se
      title: PlacementRegion
      description: >-
        Where SOAX hosts a stateful session: `eu` for Europe, the Middle East
        and Africa, `na` for North and South America, `se` for Asia and the
        Pacific. Fixed for the session's lifetime.
    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
    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
  responses:
    Unauthorized:
      description: Missing, invalid, or revoked API key.
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
          example:
            detail: Invalid API key
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key secret (starts with `s_live_`). Create keys in the dashboard
        under [**Settings → API
        keys**](https://platform.soax.com/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.