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

# Change Password

> Change the current user's password.

Verifies the current password, updates to the new password,
clears the password_change_required flag, and returns a fresh JWT.

Args:
    request: Change password request with current and new passwords
    response: FastAPI response object to set cookies
    claims: JWT claims from middleware
    user_manager: FastAPI Users user manager
    session: Database session

Returns:
    JWT token response with access_token and token_type

Raises:
    UnauthenticatedException: If current password is invalid
    BadRequestException: If new password is same as current or invalid



## OpenAPI

````yaml /openapi/api.json post /v1/auth/change-password
openapi: 3.1.0
info:
  title: Vijil Console API (Combined)
  description: Combined OpenAPI specification for all vijil-console microservices.
  version: 0.1.0
servers: []
security: []
tags:
  - name: Teams
    description: Authentication, users, and team management
  - name: Agent Environment
    description: Agent, persona, policy, and harness management
  - name: Diamond
    description: Evaluation management and report retrieval
  - name: Dome
    description: Protection, guardrails, and telemetry
  - name: Red Team
    description: Red team campaigns
paths:
  /v1/auth/change-password:
    post:
      tags:
        - Teams
        - auth
      summary: Change Password
      description: |-
        Change the current user's password.

        Verifies the current password, updates to the new password,
        clears the password_change_required flag, and returns a fresh JWT.

        Args:
            request: Change password request with current and new passwords
            response: FastAPI response object to set cookies
            claims: JWT claims from middleware
            user_manager: FastAPI Users user manager
            session: Database session

        Returns:
            JWT token response with access_token and token_type

        Raises:
            UnauthenticatedException: If current password is invalid
            BadRequestException: If new password is same as current or invalid
      operationId: change_password_v1_auth_change_password_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChangePasswordRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
                title: Response Change Password V1 Auth Change Password Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ChangePasswordRequest:
      properties:
        current_password:
          type: string
          title: Current Password
        new_password:
          type: string
          minLength: 8
          title: New Password
      type: object
      required:
        - current_password
        - new_password
      title: ChangePasswordRequest
      description: Request model for changing password.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````