> ## Documentation Index
> Fetch the complete documentation index at: https://flexprice-mintlify-1c79503c.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update current user

> Update the current authenticated user. Supports name and metadata updates.



## OpenAPI

````yaml /api-reference/openapi.json put /users/me
openapi: 3.0.1
info:
  title: Flexprice API
  description: Flexprice API Service
  contact:
    name: API Support
  license:
    name: AGPL-3.0
    url: https://www.gnu.org/licenses/agpl-3.0.html
  version: '1.0'
servers:
  - url: https://us.api.flexprice.io/v1
    description: US Region
  - url: https://api.cloud.flexprice.io/v1
    description: India Region
security: []
paths:
  /users/me:
    put:
      tags:
        - Users
      summary: Update current user
      description: >-
        Update the current authenticated user. Supports name and metadata
        updates.
      operationId: updateUser
      requestBody:
        description: Update user request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateUserRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateUserResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.ErrorResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.ErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    UpdateUserRequest:
      type: object
      properties:
        metadata:
          type: object
          additionalProperties:
            type: string
        name:
          type: string
    UpdateUserResponse:
      type: object
      properties:
        email:
          type: string
          description: Empty for service accounts
        id:
          type: string
        metadata:
          type: object
          additionalProperties:
            type: string
        name:
          type: string
        roles:
          type: array
          items:
            type: string
        tenant:
          $ref: '#/components/schemas/TenantResponse'
        type:
          $ref: '#/components/schemas/types.UserType'
    errors.ErrorResponse:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/errors.ErrorCode'
        http_status_code:
          type: integer
        message:
          type: string
      x-speakeasy-name-override: ErrorResponse
    TenantResponse:
      type: object
      properties:
        billing_details:
          $ref: '#/components/schemas/TenantBillingDetails'
        created_at:
          type: string
          format: date-time
        id:
          type: string
        metadata:
          $ref: '#/components/schemas/types.Metadata'
        name:
          type: string
        status:
          type: string
        updated_at:
          type: string
          format: date-time
    types.UserType:
      type: string
      enum:
        - user
        - service_account
      x-enum-varnames:
        - UserTypeUser
        - UserTypeServiceAccount
      x-speakeasy-name-override: UserType
    errors.ErrorCode:
      type: string
      enum:
        - http_client_error
        - system_error
        - internal_error
        - not_found
        - already_exists
        - version_conflict
        - validation_error
        - invalid_operation
        - permission_denied
        - database_error
        - service_unavailable
        - too_many_requests
      x-enum-varnames:
        - ErrCodeHTTPClient
        - ErrCodeSystemError
        - ErrCodeInternalError
        - ErrCodeNotFound
        - ErrCodeAlreadyExists
        - ErrCodeVersionConflict
        - ErrCodeValidation
        - ErrCodeInvalidOperation
        - ErrCodePermissionDenied
        - ErrCodeDatabase
        - ErrCodeServiceUnavailable
        - ErrCodeTooManyRequests
      x-speakeasy-name-override: ErrorCode
    TenantBillingDetails:
      type: object
      properties:
        address:
          $ref: '#/components/schemas/Address'
        email:
          type: string
        help_email:
          type: string
        phone:
          type: string
    types.Metadata:
      type: object
      additionalProperties:
        type: string
      x-speakeasy-name-override: Metadata
    Address:
      type: object
      properties:
        address_city:
          maxLength: 100
          type: string
        address_country:
          type: string
        address_line1:
          maxLength: 255
          type: string
        address_line2:
          maxLength: 255
          type: string
        address_postal_code:
          maxLength: 20
          type: string
        address_state:
          maxLength: 100
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      description: Enter your API key in the format *x-api-key &lt;api-key&gt;**
      name: x-api-key
      in: header

````