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

# Change the password of the user

> Change the password of the user



## OpenAPI

````yaml /api/openapi.json post /api/auth/change-password
openapi: 3.1.0
info:
  description: HTTP API for the Rootprint log management platform.
  title: Rootprint API
  version: 0.3.4
servers:
  - description: Rootprint API
    url: https://example.com
security:
  - cookieAuth: []
paths:
  /api/auth/change-password:
    post:
      tags:
        - Authentication
      summary: Change the password of the user
      description: Change the password of the user
      operationId: changePassword
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              properties:
                currentPassword:
                  description: The current password is required
                  type: string
                newPassword:
                  description: The new password to set
                  type: string
                revokeOtherSessions:
                  description: Must be a boolean value
                  type:
                    - boolean
                    - 'null'
              required:
                - newPassword
                - currentPassword
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  token:
                    description: New session token if other sessions were revoked
                    nullable: true
                    type: string
                  user:
                    properties:
                      createdAt:
                        description: When the user was created
                        format: date-time
                        type: string
                      email:
                        description: The email address of the user
                        format: email
                        type: string
                      emailVerified:
                        description: Whether the email has been verified
                        type: boolean
                      id:
                        description: The unique identifier of the user
                        type: string
                      image:
                        description: The profile image URL of the user
                        format: uri
                        nullable: true
                        type: string
                      name:
                        description: The name of the user
                        type: string
                      updatedAt:
                        description: When the user was last updated
                        format: date-time
                        type: string
                    required:
                      - id
                      - email
                      - name
                      - emailVerified
                      - createdAt
                      - updatedAt
                    type: object
                required:
                  - user
                type: object
          description: Password successfully changed
        '400':
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                required:
                  - message
                type: object
          description: >-
            Bad Request. Usually due to missing parameters, or invalid
            parameters.
        '401':
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                required:
                  - message
                type: object
          description: Unauthorized. Due to missing or invalid authentication.
        '403':
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                type: object
          description: >-
            Forbidden. You do not have permission to access this resource or to
            perform this action.
        '404':
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                type: object
          description: Not Found. The requested resource was not found.
        '429':
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                type: object
          description: >-
            Too Many Requests. You have exceeded the rate limit. Try again
            later.
        '500':
          content:
            application/json:
              schema:
                properties:
                  message:
                    type: string
                type: object
          description: >-
            Internal Server Error. This is a problem with the server that you
            cannot fix.
      security:
        - bearerAuth: []
components:
  securitySchemes:
    cookieAuth:
      in: cookie
      name: better-auth.session_token
      type: apiKey
    bearerAuth:
      description: Bearer token authentication
      scheme: bearer
      type: http

````