POST /auth/change-password
Change password for authenticated user
Changes the password of the currently logged in user, requiring verification with the old password
Authentication Required
Authorization: Bearer {token}
header string This header is required to access this endpoint
Request Body
{ "email": "string", "oldPassword": "string", "newPassword": "string"}{ "email": "user@example.com", "oldPassword": "currentPassword123", "newPassword": "newPassword456"}{ "email": "string", "oldPassword": "string", "newPassword": "string"}Try it out
Loading...
Output:
Responses
Description
Password changed successfully
{ "message": "Password changed successfully"}Description
Bad request - invalid input or password requirements not met
{ "error": "string", "status": 0, "message": "string"}Description
Unauthorized - incorrect old password or not authenticated
{ "error": "string", "status": 0, "message": "string"}Description
Internal server error
{ "error": "string", "status": 0, "message": "string"}References
#/components/schemas/Error
type: objectproperties: error: type: string description: Error message status: type: integer description: HTTP status code message: type: string description: Detailed error messagedescription: Error response objectrequired: - error|export interface Error { /** Error message */ error: string; /** HTTP status code */ status?: number; /** Detailed error message */ message?: string;}Route Source Code
Check out the source code for this route entrypoint here: /auth/change-password/route.ts
Or the swagger.yaml spec this documentation was generated from:
/auth/change-password/swagger.yaml