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

# Update User

> Update user profile fields.



## OpenAPI

````yaml /api-reference/openapi.json patch /api/users/{user_id}
openapi: 3.1.0
info:
  title: apowerb API
  description: REST API of the apowerb agentic framework (open-source edition).
  version: 0.1.2
  license:
    name: MIT
    url: https://github.com/apowerb/apowerb/blob/main/LICENSE
servers:
  - url: https://api.example.com
    description: Your apowerb instance
  - url: http://localhost:8000
    description: Local stack
security: []
paths:
  /api/users/{user_id}:
    patch:
      tags:
        - users
      summary: Update User
      description: Update user profile fields.
      operationId: update_user_api_users__user_id__patch
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: integer
            title: User Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    UserUpdate:
      properties:
        first_name:
          anyOf:
            - type: string
            - type: 'null'
          title: First Name
        onboarding_completed:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Onboarding Completed
        last_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Name
        username:
          anyOf:
            - type: string
            - type: 'null'
          title: Username
        full_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Full Name
      type: object
      title: UserUpdate
      description: Schema for partial user updates (PATCH).
    User:
      properties:
        first_name:
          type: string
          title: First Name
        last_name:
          type: string
          title: Last Name
        email:
          type: string
          format: email
          title: Email
        user_id:
          type: integer
          title: User Id
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
        role:
          type: string
          title: Role
        username:
          anyOf:
            - type: string
            - type: 'null'
          title: Username
        full_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Full Name
        avatar_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Avatar Url
        plan:
          anyOf:
            - type: string
            - type: 'null'
          title: Plan
        stripe_customer_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Stripe Customer Id
        mfa_enabled:
          type: boolean
          title: Mfa Enabled
          default: false
        onboarding_completed:
          type: boolean
          title: Onboarding Completed
          default: false
      type: object
      required:
        - first_name
        - last_name
        - email
        - user_id
        - role
      title: User
      description: |-
        Schema for reading a User (e.g GET requests).
        inculdes DB-generated fields like IDs, timestamps, etc.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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:
    HTTPBearer:
      type: http
      scheme: bearer

````

## Related topics

- [Update Session](/api-reference/update-session.md)
- [Update Eval](/api-reference/evaluation/update-eval.md)
- [Update Tool Configs](/api-reference/tools_config/update-tool-configs.md)
