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

# Update a running session

> Update supported settings on an active browser session. Supported update types are profile, proxy, screen, and solveCaptchas.



## OpenAPI

````yaml /openapi.json PUT /api/session/{id}/update
openapi: 3.0.1
info:
  title: Hyperbrowser API
  version: 1.0.0
servers:
  - url: https://api.hyperbrowser.ai
    description: Production server
security: []
paths:
  /api/session/{id}/update:
    put:
      summary: Update a running session
      description: >-
        Update supported settings on an active browser session. Supported update
        types are profile, proxy, screen, and solveCaptchas.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSessionRequest'
            examples:
              profilePersistence:
                summary: Update profile persistence
                value:
                  type: profile
                  params:
                    persistChanges: true
                    persistNetworkCache: true
              managedProxy:
                summary: Enable managed proxy
                value:
                  type: proxy
                  params:
                    enabled: true
                    location:
                      country: US
                      state: CA
                      city: San Francisco
              screenSize:
                summary: Resize screen
                value:
                  type: screen
                  params:
                    width: 1280
                    height: 720
              startCaptchaSolving:
                summary: Start CAPTCHA solving
                value:
                  type: solveCaptchas
                  params:
                    enabled: true
                    solverType: visual
              stopCaptchaSolving:
                summary: Stop CAPTCHA solving
                value:
                  type: solveCaptchas
                  params:
                    enabled: false
      responses:
        '200':
          description: Session updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateSessionResponse'
        '400':
          description: Invalid update request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Session not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: CAPTCHA evaluation is already running
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: javascript
          label: Start CAPTCHA solving
          source: |-
            import { Hyperbrowser } from '@hyperbrowser/sdk';

            const client = new Hyperbrowser({ apiKey: 'your-api-key' });

            await client.sessions.startCaptchaSolving('session-id', {
              solverType: 'visual'
            });

            await client.sessions.stopCaptchaSolving('session-id');
        - lang: python
          label: Start CAPTCHA solving
          source: |-
            from hyperbrowser import Hyperbrowser
            from hyperbrowser.models import UpdateSessionSolveCaptchasParams

            client = Hyperbrowser(api_key='your-api-key')

            client.sessions.start_captcha_solving(
              'session-id',
              UpdateSessionSolveCaptchasParams(solver_type='visual')
            )

            client.sessions.stop_captcha_solving('session-id')
        - lang: bash
          label: Start CAPTCHA solving
          source: >-
            curl -X PUT
            "https://api.hyperbrowser.ai/api/session/$SESSION_ID/update" \
              -H "Content-Type: application/json" \
              -H "x-api-key: $HYPERBROWSER_API_KEY" \
              -d '{"type":"solveCaptchas","params":{"enabled":true,"solverType":"visual"}}'
components:
  schemas:
    UpdateSessionRequest:
      oneOf:
        - $ref: '#/components/schemas/UpdateSessionProfileRequest'
        - $ref: '#/components/schemas/UpdateSessionProxyRequest'
        - $ref: '#/components/schemas/UpdateSessionScreenRequest'
        - $ref: '#/components/schemas/UpdateSessionSolveCaptchasRequest'
      discriminator:
        propertyName: type
        mapping:
          profile:
            $ref: '#/components/schemas/UpdateSessionProfileRequest'
          proxy:
            $ref: '#/components/schemas/UpdateSessionProxyRequest'
          screen:
            $ref: '#/components/schemas/UpdateSessionScreenRequest'
          solveCaptchas:
            $ref: '#/components/schemas/UpdateSessionSolveCaptchasRequest'
    UpdateSessionResponse:
      allOf:
        - $ref: '#/components/schemas/BasicResponse'
        - type: object
          properties:
            solveCaptchas:
              type: boolean
              description: Returned for solveCaptchas updates.
            sessionId:
              type: string
              description: Returned for solveCaptchas updates.
            telemetryReady:
              type: boolean
              description: Returned for solveCaptchas updates.
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
    UpdateSessionProfileRequest:
      type: object
      required:
        - type
        - params
      properties:
        type:
          type: string
          enum:
            - profile
        params:
          $ref: '#/components/schemas/UpdateSessionProfileParams'
    UpdateSessionProxyRequest:
      type: object
      required:
        - type
        - params
      properties:
        type:
          type: string
          enum:
            - proxy
        params:
          $ref: '#/components/schemas/UpdateSessionProxyParams'
    UpdateSessionScreenRequest:
      type: object
      required:
        - type
        - params
      properties:
        type:
          type: string
          enum:
            - screen
        params:
          $ref: '#/components/schemas/UpdateSessionScreenParams'
    UpdateSessionSolveCaptchasRequest:
      type: object
      required:
        - type
        - params
      properties:
        type:
          type: string
          enum:
            - solveCaptchas
        params:
          $ref: '#/components/schemas/UpdateSessionSolveCaptchasParams'
    BasicResponse:
      type: object
      properties:
        success:
          type: boolean
    UpdateSessionProfileParams:
      type: object
      properties:
        persistChanges:
          type: boolean
          description: Whether profile changes should be persisted after the session ends.
        persistNetworkCache:
          type: boolean
          description: Whether network cache should be persisted into the profile.
    UpdateSessionProxyParams:
      type: object
      required:
        - enabled
      properties:
        enabled:
          type: boolean
          description: Whether proxying should be active for the running session.
        staticIpId:
          type: string
          format: uuid
          description: Static IP allocation to use when enabling a static IP proxy.
        location:
          $ref: '#/components/schemas/UpdateSessionProxyLocationParams'
    UpdateSessionScreenParams:
      type: object
      required:
        - width
        - height
      properties:
        width:
          type: integer
          minimum: 500
          maximum: 3840
        height:
          type: integer
          minimum: 360
          maximum: 2160
    UpdateSessionSolveCaptchasParams:
      type: object
      required:
        - enabled
      properties:
        enabled:
          type: boolean
          description: >-
            Whether automatic CAPTCHA solving should be enabled for this running
            session.
        solverType:
          type: string
          enum:
            - visual
          description: >-
            Optional CAPTCHA solver mode. Set to visual to use the visual
            reCAPTCHA solver.
    UpdateSessionProxyLocationParams:
      type: object
      properties:
        country:
          $ref: '#/components/schemas/ProxyCountry'
        state:
          $ref: '#/components/schemas/ProxyState'
        city:
          type: string
          description: City for managed proxy geolocation.
    ProxyCountry:
      type: string
      enum:
        - AD
        - AE
        - AF
        - AL
        - AM
        - AO
        - AR
        - AT
        - AU
        - AW
        - AZ
        - BA
        - BD
        - BE
        - BG
        - BH
        - BJ
        - BO
        - BR
        - BS
        - BT
        - BY
        - BZ
        - CA
        - CF
        - CH
        - CI
        - CL
        - CM
        - CN
        - CO
        - CR
        - CU
        - CY
        - CZ
        - DE
        - DJ
        - DK
        - DM
        - EC
        - EE
        - EG
        - ES
        - ET
        - EU
        - FI
        - FJ
        - FR
        - GB
        - GE
        - GH
        - GM
        - GR
        - HK
        - HN
        - HR
        - HT
        - HU
        - ID
        - IE
        - IL
        - IN
        - IQ
        - IR
        - IS
        - IT
        - JM
        - JO
        - JP
        - KE
        - KH
        - KR
        - KW
        - KZ
        - LB
        - LI
        - LR
        - LT
        - LU
        - LV
        - MA
        - MC
        - MD
        - ME
        - MG
        - MK
        - ML
        - MM
        - MN
        - MR
        - MT
        - MU
        - MV
        - MX
        - MY
        - MZ
        - NG
        - NL
        - 'NO'
        - NZ
        - OM
        - PA
        - PE
        - PH
        - PK
        - PL
        - PR
        - PT
        - PY
        - QA
        - RANDOM_COUNTRY
        - RO
        - RS
        - RU
        - SA
        - SC
        - SD
        - SE
        - SG
        - SI
        - SK
        - SN
        - SS
        - TD
        - TG
        - TH
        - TM
        - TN
        - TR
        - TT
        - TW
        - UA
        - UG
        - US
        - UY
        - UZ
        - VE
        - VG
        - VN
        - YE
        - ZA
        - ZM
        - ZW
        - ad
        - ae
        - af
        - al
        - am
        - ao
        - ar
        - at
        - au
        - aw
        - az
        - ba
        - bd
        - be
        - bg
        - bh
        - bj
        - bo
        - br
        - bs
        - bt
        - by
        - bz
        - ca
        - cf
        - ch
        - ci
        - cl
        - cm
        - cn
        - co
        - cr
        - cu
        - cy
        - cz
        - de
        - dj
        - dk
        - dm
        - ec
        - ee
        - eg
        - es
        - et
        - eu
        - fi
        - fj
        - fr
        - gb
        - ge
        - gh
        - gm
        - gr
        - hk
        - hn
        - hr
        - ht
        - hu
        - id
        - ie
        - il
        - in
        - iq
        - ir
        - is
        - it
        - jm
        - jo
        - jp
        - ke
        - kh
        - kr
        - kw
        - kz
        - lb
        - li
        - lr
        - lt
        - lu
        - lv
        - ma
        - mc
        - md
        - me
        - mg
        - mk
        - ml
        - mm
        - mn
        - mr
        - mt
        - mu
        - mv
        - mx
        - my
        - mz
        - ng
        - nl
        - 'no'
        - nz
        - om
        - pa
        - pe
        - ph
        - pk
        - pl
        - pr
        - pt
        - py
        - qa
        - ro
        - rs
        - ru
        - sa
        - sc
        - sd
        - se
        - sg
        - si
        - sk
        - sn
        - ss
        - td
        - tg
        - th
        - tm
        - tn
        - tr
        - tt
        - tw
        - ua
        - ug
        - us
        - uy
        - uz
        - ve
        - vg
        - vn
        - ye
        - za
        - zm
        - zw
    ProxyState:
      type: string
      enum:
        - AL
        - AK
        - AZ
        - AR
        - CA
        - CO
        - CT
        - DE
        - FL
        - GA
        - HI
        - ID
        - IL
        - IN
        - IA
        - KS
        - KY
        - LA
        - ME
        - MD
        - MA
        - MI
        - MN
        - MS
        - MO
        - MT
        - NE
        - NV
        - NH
        - NJ
        - NM
        - NY
        - NC
        - ND
        - OH
        - OK
        - OR
        - PA
        - RI
        - SC
        - SD
        - TN
        - TX
        - UT
        - VT
        - VA
        - WA
        - WV
        - WI
        - WY
        - al
        - ak
        - az
        - ar
        - ca
        - co
        - ct
        - de
        - fl
        - ga
        - hi
        - id
        - il
        - in
        - ia
        - ks
        - ky
        - la
        - me
        - md
        - ma
        - mi
        - mn
        - ms
        - mo
        - mt
        - ne
        - nv
        - nh
        - nj
        - nm
        - ny
        - nc
        - nd
        - oh
        - ok
        - or
        - pa
        - ri
        - sc
        - sd
        - tn
        - tx
        - ut
        - vt
        - va
        - wa
        - wv
        - wi
        - wy
      nullable: true
      description: >-
        Optional state code for proxies to US states. Is mutually exclusive with
        proxyCity. Takes in two letter state code.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````