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

# Update a SOCKS5 user

> Rebind the user to a different proxy (or detach it by passing null).



## OpenAPI

````yaml /api-reference/mobilerun-proxy/users.yaml patch /connect/users/{id}
openapi: 3.1.0
info:
  title: Users
  version: v1
servers:
  - description: Droidrun Cloud API
    url: https://api.mobilerun.ai/v1
security:
  - bearerAuth: []
paths:
  /connect/users/{id}:
    patch:
      tags:
        - Users
      summary: Update a SOCKS5 user
      description: Rebind the user to a different proxy (or detach it by passing null).
      operationId: UpdateUser
      parameters:
        - $ref: '#/components/parameters/UserID'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateUserRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
          description: The updated user.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Mobilerun from '@mobilerun/sdk';


            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });


            const user = await
            client.connect.users.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');


            console.log(user.id);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            user = client.connect.users.update(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(user.id)
components:
  parameters:
    UserID:
      in: path
      name: id
      required: true
      schema:
        format: uuid
        type: string
  schemas:
    UpdateUserRequest:
      properties:
        proxyId:
          description: >-
            Proxy to rebind to, or null to detach. Omit to leave the user's
            current binding unchanged — only an explicit null detaches.
          format: uuid
          nullable: true
          type: string
          x-go-type: nullable.Nullable[openapi_types.UUID]
          x-go-type-import:
            path: github.com/oapi-codegen/nullable
          x-go-type-skip-optional-pointer: true
      type: object
    User:
      description: A SOCKS5 credential without its password.
      properties:
        createdAt:
          format: date-time
          type: string
        id:
          format: uuid
          type: string
        proxyId:
          description: >-
            The proxy this user routes to (dedicated routing), or null if
            unbound.
          format: uuid
          nullable: true
          type: string
        username:
          type: string
      required:
        - id
        - username
        - createdAt
      type: object
    ConnectErrorResponse:
      description: A Problem Details (RFC 7807-style) error response.
      properties:
        detail:
          description: Human-readable explanation of this occurrence.
          type: string
        errors:
          description: Per-input errors, when applicable.
          items:
            $ref: '#/components/schemas/ConnectErrorDetail'
          type: array
        status:
          description: HTTP status code.
          type: integer
        title:
          description: Short, human-readable summary of the error type.
          type: string
      required:
        - title
        - status
        - detail
        - errors
      type: object
    ConnectErrorDetail:
      description: A single error, locating an offending input where applicable.
      properties:
        location:
          description: Path to the offending input, e.g. "body.proxyId".
          type: string
        message:
          description: Human-readable description of this error.
          type: string
        value:
          description: The offending value, when available.
      required:
        - location
        - message
      type: object
  responses:
    BadRequest:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ConnectErrorResponse'
      description: The request was invalid.
    Unauthorized:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ConnectErrorResponse'
      description: Missing or invalid credentials.
    NotFound:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ConnectErrorResponse'
      description: The resource was not found.
  securitySchemes:
    bearerAuth:
      bearerFormat: Opaque
      description: Bearer token via Authorization header
      scheme: bearer
      type: http

````

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