Truztcube Docs
API ReferenceAuthentication

Change password for authenticated user

POST/v1/auth/change-password
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/v1/auth/change-password" \  -H "Content-Type: application/json" \  -d '{    "currentPassword": "OldP@ssw0rd!",    "newPassword": "NewSecureP@ssw0rd!"  }'
{  "success": true,  "statusCode": 200,  "message": "Request processed successfully",  "timestamp": "2025-10-20T16:30:00.000Z",  "path": "/v1/auth/register",  "data": {    "message": "Password has been changed successfully"  }}
{  "success": false,  "statusCode": 400,  "message": "Validation failed",  "errors": [    {      "field": "email",      "message": "Email must be a valid email address"    }  ],  "timestamp": "2025-10-20T16:30:00.000Z",  "path": "/v1/auth/register"}
{  "success": false,  "statusCode": 400,  "message": "Validation failed",  "errors": [    {      "field": "email",      "message": "Email must be a valid email address"    }  ],  "timestamp": "2025-10-20T16:30:00.000Z",  "path": "/v1/auth/register"}