Change user password
POST
/v1/auth/change-password
const url = 'https://api.neuramancer.dev/v1/auth/change-password';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"currentPassword":"example","newPassword":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.neuramancer.dev/v1/auth/change-password \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "currentPassword": "example", "newPassword": "example" }'Changes the authenticated user’s password. Requires a valid Bearer token in the Authorization header. The current password is verified before updating.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
currentPassword
required
The user’s current password
string
newPassword
required
The new password to set
string
Examplegenerated
{ "currentPassword": "example", "newPassword": "example"}Responses
Section titled “Responses”Password changed successfully
Media typeapplication/json
object
success
boolean
Example
{ "success": true}Missing fields or password change failed
Media typeapplication/json
Standardized error response following the APIResponse
object
success
required
boolean
message
required
string
Example
{ "success": false, "message": "Bad request"}Invalid or expired token
Media typeapplication/json
Standardized error response following the APIResponse
object
success
required
boolean
message
required
string
Example
{ "success": false, "message": "Bad request"}Server error during password change
Media typeapplication/json
Standardized error response following the APIResponse
object
success
required
boolean
message
required
string
Example
{ "success": false, "message": "Bad request"}