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

# Change Password

> Changes the password of the user.



## OpenAPI

````yaml put /users/passwords
openapi: 3.0.1
info:
  title: TrustOS EVM ID API
  description: >-
    TrustOS EVM ID API is used to interact with EVM based blockchain networks.
    In case you have some questions or need more about the use of this API,
    don't hesitate to contact B-Team:
  contact:
    name: Blockchain Team
    email: soporte-bteam@telefonica.com
  version: 2.3.3
servers:
  - url: https://lab.trustos.telefonicatech.com/id/v2
    description: Lab
security: []
tags:
  - name: Authentication
    description: Users authentication via a JSON Web Token (JWT).
  - name: Identity
    description: User identity management.
paths:
  /users/passwords:
    put:
      tags:
        - Identity
      summary: Change password.
      requestBody:
        description: Data needed to change password.
        content:
          application/json:
            schema:
              type: object
              properties:
                currentPassword:
                  type: string
                  description: The user's current password.
                  example: current_password
                newPassword:
                  type: string
                  description: The user's new password.
                  example: new_password
              required:
                - currentPassword
                - newPassword
        required: true
      responses:
        '200':
          $ref: '#/components/responses/200-ChangedPassword'
        '400':
          $ref: '#/components/responses/400-ValidationError'
        '401':
          $ref: '#/components/responses/401-AuthenticationError'
        '500':
          $ref: '#/components/responses/500-InternalServerError'
        '503':
          $ref: '#/components/responses/503-ServiceUnavailable'
      security:
        - bearerAuth: []
components:
  responses:
    200-ChangedPassword:
      description: Successful password update.
      content:
        application/json:
          schema:
            type: object
            properties:
              statusCode:
                type: number
                description: Request status code.
                example: 200
              message:
                type: string
                description: Message returned by the request.
                example: Password updated
              data:
                type: string
                description: Data returned by the request.
                example: Password changed successfully for user did:user:<id>
    400-ValidationError:
      description: Validation Error.
      content:
        application/json:
          schema:
            type: object
            properties:
              statusCode:
                type: number
                description: Request status code.
                example: 400
              type:
                type: string
                description: Error type.
                example: Validation Error
              message:
                type: string
                description: Message returned by the request.
                example: Request parameters are wrong, check requirements
              errors:
                type: array
                description: All the validation errors encountered in the request.
                items:
                  type: object
                  properties:
                    field:
                      type: string
                      description: Name of the field.
                      example: ''
                    error:
                      type: string
                      description: Description of the error encountered.
                      example: ''
    401-AuthenticationError:
      description: Authentication Error.
      content:
        application/json:
          schema:
            type: object
            properties:
              statusCode:
                type: number
                description: Request status code.
                example: 401
              type:
                type: string
                description: Error type.
                example: Authentication Error
              message:
                type: string
                description: Message returned by the request.
                example: Token is not provided
    500-InternalServerError:
      description: Internal Server Error.
      content:
        application/json:
          schema:
            type: object
            properties:
              statusCode:
                type: number
                description: Request status code.
                example: 500
              type:
                type: string
                description: Error type.
                example: Internal Server Error
              message:
                type: string
                description: Message returned by the request.
                example: Oops! Something went wrong, please try again later
    503-ServiceUnavailable:
      description: Service unavailable error.
      content:
        application/json:
          schema:
            type: object
            properties:
              statusCode:
                type: number
                description: Request status code.
                example: 503
              type:
                type: string
                description: Error type.
                example: Service Unavailable Error
              message:
                type: string
                description: Message returned by the request.
                example: Service temporarily unavailable, please try again later
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````