POST/auth/change-password

Change the authenticated user's password

Changes the authenticated user's password. Provide the current password in oldPassword and the new password in newPassword; both values must be at least 8 characters. The current password must match the stored password.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

2 body fields

Current and new password values for the authenticated user.

newPasswordstringrequired
New password. Must be at least 8 characters.
oldPasswordstringrequired
Current password. Must match the stored password.

3 status codes
200Returns a response confirming that the password was changed.
dataunknownoptional
Response payload
statusintegeroptional
successbooleanoptional
400Returned when the current password is incorrect.
errorstringoptional
Reason phrase, for example `Bad Request`.
messagestringoptional
statusCodeintegeroptional
404Returned when the user is not found.
errorstringoptional
Reason phrase, for example `Bad Request`.
messagestringoptional
statusCodeintegeroptional

Error handling

A 400 is returned when oldPassword does not match the stored password. A 404 is returned when the user is not found. Both oldPassword and newPassword are required and must be at least 8 characters.