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

# Update current user

> Updates the currently authenticated user. Only the values provided will be updated.



## OpenAPI

````yaml /openapi/client.json patch /users/me
openapi: 3.1.0
info:
  title: Hexclave REST API
  version: 1.0.0
  description: >-
    The Hexclave REST API. All request headers are documented as canonical
    `X-Hexclave-*`; the equivalent `X-Stack-*` aliases are accepted on every
    endpoint for backwards compatibility. Response headers
    `X-Hexclave-actual-status`, `X-Hexclave-known-error`, and
    `X-Hexclave-request-id` are emitted alongside their legacy `X-Stack-*`
    equivalents.
servers:
  - url: https://api.hexclave.com/api/v1
    description: Hexclave REST API
security: []
paths:
  /users/me:
    patch:
      tags:
        - Users
      summary: Update current user
      description: >-
        Updates the currently authenticated user. Only the values provided will
        be updated.
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                display_name:
                  type: string
                  example: John Doe
                  description: >-
                    Human-readable user display name. This is not a unique
                    identifier.
                profile_image_url:
                  type: string
                  example: https://example.com/image.jpg
                  description: >-
                    URL of the profile image for user. Can be a Base64 encoded
                    image. Must be smaller than 100KB. Please compress and crop
                    to a square before passing in.
                client_metadata:
                  type: object
                  example:
                    key: value
                  description: >-
                    Client metadata. Used as a data store, accessible from the
                    client side. Do not store information that should not be
                    exposed to the client.
                selected_team_id:
                  type: string
                  example: team-id
                  description: ID of the team currently selected by the user
                totp_secret_base64:
                  type: string
                  example: dG90cC1zZWNyZXQ=
                  description: >-
                    Enables 2FA and sets a TOTP secret for the user. Set to null
                    to disable 2FA.
                primary_email:
                  type: string
                  example: johndoe@example.com
                  description: Primary email
              example:
                display_name: John Doe
                profile_image_url: https://example.com/image.jpg
                client_metadata:
                  key: value
                selected_team_id: team-id
                totp_secret_base64: dG90cC1zZWNyZXQ=
                primary_email: johndoe@example.com
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  selected_team:
                    type: object
                    properties:
                      id:
                        type: string
                        example: ad962777-8244-496a-b6a2-e0c6a449c79e
                        description: The unique identifier of the team
                      display_name:
                        type: string
                        example: My Team
                        description: >-
                          Human-readable team display name. This is not a unique
                          identifier.
                      profile_image_url:
                        type: string
                        example: https://example.com/image.jpg
                        description: >-
                          URL of the profile image for team. Can be a Base64
                          encoded image. Must be smaller than 100KB. Please
                          compress and crop to a square before passing in.
                      client_metadata:
                        type: object
                        example:
                          key: value
                        description: >-
                          Client metadata. Used as a data store, accessible from
                          the client side. Do not store information that should
                          not be exposed to the client.
                      client_read_only_metadata:
                        type: object
                        example:
                          key: value
                        description: >-
                          Client read-only, server-writable metadata. Used as a
                          data store, accessible from the client side. Do not
                          store information that should not be exposed to the
                          client. The client can read this data, but cannot
                          modify it. This is useful for things like subscription
                          status.
                    required:
                      - id
                      - display_name
                  id:
                    type: string
                    example: 3241a285-8329-4d69-8f3d-316e08cf140c
                    description: The unique identifier of the user
                  primary_email:
                    type: string
                    example: johndoe@example.com
                    description: Primary email
                  primary_email_verified:
                    type: boolean
                    example: true
                    description: >-
                      Whether the primary email has been verified to belong to
                      this user
                  display_name:
                    type: string
                    example: John Doe
                    description: >-
                      Human-readable user display name. This is not a unique
                      identifier.
                  client_metadata:
                    type: object
                    example:
                      key: value
                    description: >-
                      Client metadata. Used as a data store, accessible from the
                      client side. Do not store information that should not be
                      exposed to the client.
                  client_read_only_metadata:
                    type: object
                    example:
                      key: value
                    description: >-
                      Client read-only, server-writable metadata. Used as a data
                      store, accessible from the client side. Do not store
                      information that should not be exposed to the client. The
                      client can read this data, but cannot modify it. This is
                      useful for things like subscription status.
                  profile_image_url:
                    type: string
                    example: https://example.com/image.jpg
                    description: >-
                      URL of the profile image for user. Can be a Base64 encoded
                      image. Must be smaller than 100KB. Please compress and
                      crop to a square before passing in.
                  signed_up_at_millis:
                    type: number
                    example: 1630000000000
                    description: >-
                      The time the user signed up (identify) => `(the number of
                      milliseconds since epoch, January 1, 1970, UTC)`
                  selected_team_id:
                    type: string
                    example: team-id
                    description: ID of the team currently selected by the user
                  is_anonymous:
                    type: boolean
                  is_restricted:
                    type: boolean
                    example: false
                    description: >-
                      Whether the user is in restricted state (has signed up but
                      not completed onboarding requirements)
                  restricted_reason:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - anonymous
                          - email_not_verified
                          - restricted_by_administrator
                    required:
                      - type
                    example: null
                    description: >-
                      The reason why the user is restricted (e.g., type:
                      "email_not_verified", "anonymous", or
                      "restricted_by_administrator"), null if not restricted
                  restricted_by_admin:
                    type: boolean
                    example: false
                    description: >-
                      Whether the user is restricted by an administrator. Can be
                      set manually or by sign-up rules.
                  restricted_by_admin_reason:
                    type: string
                    example: null
                    description: >-
                      Public reason shown to the user explaining why they are
                      restricted. Optional.
                required:
                  - id
                  - primary_email_verified
                  - signed_up_at_millis
                  - is_anonymous
                  - is_restricted
                  - restricted_by_admin

````