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

# Update user

> This endpoint is used to update the user's details.

Endpoint: [https://cashboard-f5x2.onrender.com/user/:id](https://cashboard-f5x2.onrender.com/user/:id)

Path Parameter: User's UUID

It can be used to update:

- currency (string) - the user's preferred currency
- email address (string)
- username (string)
- password (string)
    

> This endpoint can not be used to update the user's accounts, expenses, income, savings and investments.



## OpenAPI

````yaml put /user/{id}
openapi: 3.0.0
info:
  title: Cashboard API
  description: >-
    Cashboard is a personal finance tool that helps users keep track of their
    income, expenses, savings and investments.


    API URL: `https://cashboard-f5x2.onrender.com`


    The Cashboard API has endpoints for:


    - Users

    - Accounts

    - Income

    - Expenses

    - Savings

    - Investments
  version: 1.0.0
servers:
  - url: https://cashboard-f5x2.onrender.com
security: []
tags:
  - name: User
    description: |-
      Cashboard uses the users endpoint to:

      - create a new user
      - get a user details
      - update user details
          

      The endpoint URL: `https://cashboard-f5x2.onrender.com/user`
  - name: Account
    description: |-
      These endpoints are used to:

      - create account
      - get all user's accounts
      - get account
      - update accounts
      - delete accounts.
          

      The endpoint URL is: `https://cashboard-f5x2.onrender.com/account`
  - name: Income
    description: |-
      These endpoints are used to:

      - create an income source
      - get all income source
      - get an income source
      - update income source
      - delete income source
          

      The endpoint URL: `https://cashboard-f5x2.onrender.com/income`
  - name: Expenses
    description: |-
      These endpoints are used to:

      - create an expense
      - get all expenses
      - get an expense
      - update an expense
      - delete an expense
          

      The endpoint URL is: `https://cashboard-f5x2.onrender.com/expenses`
  - name: Savings
    description: |-
      These endpoints are used to:

      - create a saving
      - get all savings
      - get a saving
      - update a saving
      - delete a saving
          

      The endpoint URL: `https://cashboard-f5x2.onrender.com/savings`
  - name: Investments
    description: |-
      These endpoints are used to:

      - create an investment
          
      - get all investments
          
      - get an investment
          
      - update an investment
          
      - delete an investment
          

      The endpoint URL: `https://cashboard-f5x2.onrender.com/investments`
paths:
  /user/{id}:
    put:
      tags:
        - User
      summary: Update user
      description: >-
        This endpoint is used to update the user's details.


        Endpoint:
        [https://cashboard-f5x2.onrender.com/user/:id](https://cashboard-f5x2.onrender.com/user/:id)


        Path Parameter: User's UUID


        It can be used to update:


        - currency (string) - the user's preferred currency

        - email address (string)

        - username (string)

        - password (string)
            

        > This endpoint can not be used to update the user's accounts, expenses,
        income, savings and investments.
      parameters:
        - name: id
          in: path
          schema:
            type: string
          required: true
          description: required
          example: '{{uuid}}'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                currency: KSH
      responses:
        '200':
          description: OK
          headers:
            X-Powered-By:
              schema:
                type: string
                example: Express
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Content-Length:
              schema:
                type: integer
                example: '276'
            ETag:
              schema:
                type: string
                example: W/"114-3MzmrYaZewZKISGFNdZf7jetRxc"
            Date:
              schema:
                type: string
                example: Mon, 12 Feb 2024 06:43:50 GMT
            Connection:
              schema:
                type: string
                example: keep-alive
            Keep-Alive:
              schema:
                type: string
                example: timeout=5
          content:
            application/json:
              schema:
                type: object
              example:
                _id: 65c9bd409983f403ed82f194
                username: michellem
                email: michelle.muthoni@gmail.com
                password: $2a$10$yjp6lyCU6.jwQrhOG/7kjOhnYHR3dyh4t8EkdoC3np9IZstHoiXiC
                currency: USD
                accounts: []
                income: []
                expenses: []
                savings: []
                investments: []
                reports: []
                __v: 0
        '500':
          description: Internal Server Error
          headers:
            Date:
              schema:
                type: string
                example: Mon, 29 Apr 2024 15:50:11 GMT
            Content-Type:
              schema:
                type: string
                example: application/json; charset=utf-8
            Transfer-Encoding:
              schema:
                type: string
                example: chunked
            Connection:
              schema:
                type: string
                example: keep-alive
            CF-Ray:
              schema:
                type: string
                example: 87c0723efd9707a0-IAD
            CF-Cache-Status:
              schema:
                type: string
                example: DYNAMIC
            ETag:
              schema:
                type: string
                example: W/"3c-yxkCqTD1MwlnN/TfQyhJ8K6J6bc"
            Vary:
              schema:
                type: string
                example: Origin, Accept-Encoding
            rndr-id:
              schema:
                type: string
                example: d24a3024-f592-4c10
            x-powered-by:
              schema:
                type: string
                example: Express
            x-render-origin-server:
              schema:
                type: string
                example: Render
            Server:
              schema:
                type: string
                example: cloudflare
            alt-svc:
              schema:
                type: string
                example: h3=":443"; ma=86400
          content:
            application/json:
              schema:
                type: object
              example:
                status: error
                message: The user could not be updated

````