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

# Update Settings

> Re-target an owned rotating package. Free - nothing is charged.

Only the fields present in the body change. ``clear`` resets a narrowing
filter back to "any". A geo/rotation change re-provisions the package: the
OLD credentials keep working until the new ones are proven, and a provider
failure returns ``status: failed`` with nothing changed.



## OpenAPI

````yaml /api-reference/proxy.json patch /v1/proxy/subscriptions/{sub_id}/settings
openapi: 3.1.0
info:
  title: Lumi Proxy API
  version: 1.1.0
  description: >-
    Публичный REST API прокси Lumi. Ключ привязан к одному аккаунту и делает то
    же, что клиент делает в боте.


    Авторизация: `Authorization: Bearer <ключ>`. Денежные запросы дополнительно
    требуют заголовок `Idempotency-Key`.
servers:
  - url: https://api.lumiweb.cc/proxy
    description: production
security:
  - bearerAuth: []
paths:
  /v1/proxy/subscriptions/{sub_id}/settings:
    patch:
      tags:
        - proxy
      summary: Update Settings
      description: >-
        Re-target an owned rotating package. Free - nothing is charged.


        Only the fields present in the body change. ``clear`` resets a narrowing

        filter back to "any". A geo/rotation change re-provisions the package:
        the

        OLD credentials keep working until the new ones are proven, and a
        provider

        failure returns ``status: failed`` with nothing changed.
      operationId: update_settings
      parameters:
        - name: sub_id
          in: path
          required: true
          schema:
            type: integer
            title: Sub Id
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SettingsRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SettingsOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SettingsRequest:
      properties:
        country:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Country
        region:
          anyOf:
            - type: string
              maxLength: 128
            - type: 'null'
          title: Region
        city:
          anyOf:
            - type: string
              maxLength: 128
            - type: 'null'
          title: City
        isp:
          anyOf:
            - type: string
              maxLength: 128
            - type: 'null'
          title: Isp
        rotation_seconds:
          anyOf:
            - type: integer
              maximum: 604800
              minimum: 1
            - type: 'null'
          title: Rotation Seconds
        session_mode:
          anyOf:
            - type: string
              enum:
                - rotating
                - sticky
            - type: 'null'
          title: Session Mode
        protocol:
          anyOf:
            - type: string
              enum:
                - http
                - socks5
            - type: 'null'
          title: Protocol
        format:
          anyOf:
            - type: string
              enum:
                - url
                - user:pass@host:port
                - user:pass:host:port
                - host:port:user:pass
            - type: 'null'
          title: Format
        clear:
          items:
            type: string
            enum:
              - region
              - city
              - isp
              - rotation_seconds
          type: array
          title: Clear
          description: fields to reset to 'any' / default
      type: object
      title: SettingsRequest
      description: |-
        Free, in-place re-targeting of an owned rotating subscription.

        Only the fields you send are changed; the rest keep their stored value.
        Nothing is charged.
    SettingsOut:
      properties:
        subscription_id:
          type: integer
          title: Subscription Id
        status:
          type: string
          title: Status
          description: '''reprovisioned'' | ''persisted'' | ''failed'''
        targeting:
          anyOf:
            - $ref: '#/components/schemas/TargetingOut'
            - type: 'null'
      type: object
      required:
        - subscription_id
        - status
      title: SettingsOut
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TargetingOut:
      properties:
        country_iso:
          anyOf:
            - type: string
            - type: 'null'
          title: Country Iso
        country_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Country Name
        region:
          anyOf:
            - type: string
            - type: 'null'
          title: Region
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
        isp:
          anyOf:
            - type: string
            - type: 'null'
          title: Isp
        rotation_seconds:
          anyOf:
            - type: integer
            - type: 'null'
          title: Rotation Seconds
          description: null = a new IP as often as the pool allows
        session_mode:
          anyOf:
            - type: string
            - type: 'null'
          title: Session Mode
        protocol:
          anyOf:
            - type: string
            - type: 'null'
          title: Protocol
        format:
          anyOf:
            - type: string
            - type: 'null'
          title: Format
      type: object
      title: TargetingOut
      description: Geo / rotation snapshot stored on the subscription.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Ключ вида lumi_proxy_… Выдаётся оператором.

````