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

# Update User

> Update user metadata or change user identifier.

Modify user attributes including custom metadata and the custom_user_id itself. When changing
the custom_user_id, the new ID must not already exist in the project.

**Path Parameters:**
- `custom_user_id` (str): Current unique identifier for the user

**Body Parameters:**
- `new_custom_user_id` (str): New user identifier to replace current one. Optional
- `new_metadata` (Dict[str, Any]): New metadata JSON object to replace current metadata. Optional

**Returns:**
- `user` (UserInfo): Updated user object with new values



## OpenAPI

````yaml https://api.recallrai.com/api/openapi.json put /api/v1/users/{custom_user_id}
openapi: 3.1.0
info:
  title: api-backend
  description: This powers the Recallr AI API Backend
  version: 0.1.0
servers:
  - url: https://api.recallrai.com
    description: Production server
security: []
paths:
  /api/v1/users/{custom_user_id}:
    put:
      tags:
        - Users
      summary: Update User
      description: >-
        Update user metadata or change user identifier.


        Modify user attributes including custom metadata and the custom_user_id
        itself. When changing

        the custom_user_id, the new ID must not already exist in the project.


        **Path Parameters:**

        - `custom_user_id` (str): Current unique identifier for the user


        **Body Parameters:**

        - `new_custom_user_id` (str): New user identifier to replace current
        one. Optional

        - `new_metadata` (Dict[str, Any]): New metadata JSON object to replace
        current metadata. Optional


        **Returns:**

        - `user` (UserInfo): Updated user object with new values
      operationId: update_user_api_v1_users__custom_user_id__put
      parameters:
        - name: custom_user_id
          in: path
          required: true
          schema:
            type: string
            title: The ID of the user to update
        - name: X-Recallr-Project-Id
          in: header
          required: true
          schema:
            type: string
            format: uuid
            title: X-Recallr-Project-Id
        - name: X-Recallr-Api-Key
          in: header
          required: true
          schema:
            type: string
            title: X-Recallr-Api-Key
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Body_update_user_api_v1_users__custom_user_id__put
      responses:
        '200':
          description: User updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateUserResponse'
        '401':
          description: Authentication required
        '404':
          description: User not found
        '409':
          description: User ID conflict or constraint violation
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
components:
  schemas:
    Body_update_user_api_v1_users__custom_user_id__put:
      properties:
        new_custom_user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: The new ID of the user
        new_metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: The new metadata of the user
        merge_conflict_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: >-
            Override merge conflict behaviour for this user. True=always raise,
            False=never raise, null=inherit project setting
      type: object
      title: Body_update_user_api_v1_users__custom_user_id__put
    UpdateUserResponse:
      properties:
        user:
          $ref: '#/components/schemas/UserInfo'
      type: object
      required:
        - user
      title: UpdateUserResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    UserInfo:
      properties:
        custom_user_id:
          type: string
          title: Custom User Id
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
        merge_conflict_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Merge Conflict Enabled
        created_at:
          type: string
          format: date-time
          title: Created At
        last_active_at:
          type: string
          format: date-time
          title: Last Active At
      type: object
      required:
        - custom_user_id
        - metadata
        - merge_conflict_enabled
        - created_at
        - last_active_at
      title: UserInfo
    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

````