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

# Update user metadata

> Update user metadata using the user ID from the path



## OpenAPI

````yaml /swagger.json patch /v1/{app_id}/users/{id}
openapi: 3.0.1
info:
  title: Scute API
  version: v1
  description: API for managing users in Scute applications
servers:
  - url: https://{defaultHost}
    variables:
      defaultHost:
        default: api.scute.io
  - url: http://localhost:3333
    description: Development server
security:
  - apiSecret: []
    userAccess: []
paths:
  /v1/{app_id}/users/{id}:
    parameters:
      - name: app_id
        in: path
        required: true
        description: App ID
        schema:
          type: string
      - name: id
        in: path
        description: User ID
        required: true
        schema:
          type: string
    patch:
      tags:
        - Users
      summary: Update user metadata
      description: Update user metadata using the user ID from the path
      operationId: updateUser
      parameters: []
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  user:
                    $ref: '#/components/schemas/DetailedAppUser'
        '400':
          description: bad request - missing user_meta
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '404':
          description: not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      security:
        - apiSecret: []
components:
  schemas:
    DetailedAppUser:
      type: object
      properties:
        id:
          type: string
          description: App user ID
          example: usr_1234567890
        app_id:
          type: string
          description: Application ID
        user_id:
          type: string
          description: Base user ID
        status:
          type: string
          enum:
            - active
            - pending
            - inactive
            - imported
          description: User status
        email:
          type: string
          format: email
          description: User email
          example: user@example.com
        phone:
          type: string
          description: User phone number
          example: '+1234567890'
        name:
          type: string
          description: User full name
          example: John Doe
        login_count:
          type: integer
          description: Number of times user has logged in
        last_login_at:
          type: string
          format: date-time
          nullable: true
          description: Last login timestamp
        email_verified:
          type: boolean
          description: Whether email is verified
        phone_verified:
          type: boolean
          description: Whether phone is verified
        created_at:
          type: string
          format: date-time
          description: Creation timestamp
        updated_at:
          type: string
          format: date-time
          description: Last update timestamp
        user_meta:
          type: object
          description: User metadata object with custom fields
          example:
            first_name: John
            last_name: Doe
            company: Acme Corp
            role: Developer
        sessions:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: Session ID
              device_name:
                type: string
                description: Device name
              created_at:
                type: string
                format: date-time
                description: Session creation time
              last_used_at:
                type: string
                format: date-time
                description: Last session usage
          description: Active user sessions
      required:
        - id
        - app_id
        - user_id
        - status
  securitySchemes:
    apiSecret:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: API Secret token
    userAccess:
      type: apiKey
      name: X-Authorization
      in: header
      description: User Access token

````