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

# Update user

> Update user. Permissions ["admin"]



## OpenAPI

````yaml https://api.paylora.org/api-doc-json patch /api/v1/user/{uuid}
openapi: 3.0.0
info:
  title: PAYLORA API
  description: Paylora Backend API
  version: '1.0'
  contact: {}
servers:
  - url: https://api.paylora.org
security: []
tags: []
paths:
  /api/v1/user/{uuid}:
    patch:
      tags:
        - User
      summary: Update user
      description: Update user. Permissions ["admin"]
      operationId: UserController_updateRole_v1
      parameters:
        - name: uuid
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateUserDto'
      responses:
        '200':
          description: Resource model
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ResourceDto'
                  - properties:
                      data:
                        $ref: '#/components/schemas/User'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                example:
                  statusCode: 400
                  message:
                    - '[value] is not valid'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                example:
                  statusCode: 401
                  message: Invalid signature | jwt must be provided
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                example:
                  statusCode: 403
                  message: Only [admin, customer] has access
        '404':
          description: Resource Not Found
          content:
            application/json:
              schema:
                type: object
                example:
                  statusCode: 404
                  message: Resource Not Found
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                example:
                  statusCode: 409
                  message: Resource with unique value (email, name etc) already exist
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                type: object
                example:
                  statusCode: 429
                  message: Too Many Requests
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                example:
                  statusCode: 500
                  message: Sever error message
      security:
        - JWT: []
components:
  schemas:
    UpdateUserDto:
      type: object
      properties:
        role:
          type: string
          enum:
            - customer
            - admin
          example: customer
        status:
          type: string
          enum:
            - created
            - purged
            - verified
            - whitelisted_pending
            - whitelisted
          example: verified
      required:
        - role
    ResourceDto:
      type: object
      properties:
        success:
          type: boolean
          example: true
          description: Indicates if the request was successful
        data:
          type: object
          description: The data returned by the API
      required:
        - success
        - data
    User:
      type: object
      properties:
        user_uuid:
          type: string
        email:
          type: string
        telegram_id:
          type: string
        tg_name:
          type: string
        status:
          type: string
        created_on:
          format: date-time
          type: string
        role:
          type: string
        wallet:
          type: string
          example: 0xDeF456...
          description: User wallet address
        fee_bps:
          type: number
          example: 0xDeF456...
          description: User fee BPS
      required:
        - user_uuid
        - email
        - telegram_id
        - tg_name
        - status
        - created_on
        - role
        - wallet
        - fee_bps
  securitySchemes:
    JWT:
      scheme: bearer
      bearerFormat: JWT
      type: http

````