Skip to Content
HomeLink Hub
Users & Profile

Change the account password

POST
/api/v1/user/change-password

Access: Bearer token required.

Replaces the password after checking the current one. Accounts created with Google or Apple have no password and cannot use this endpoint. On success a password_changed notification ("Password Changed") is created and delivered in-app, by push and by email according to the user's systemUpdates preferences. Existing sessions, access tokens and the refresh token are not revoked; call POST /user/logout-all-devices to do that.

A wrong current password is answered with 401. Clients that treat every 401 as an expired session should special-case this endpoint so the user is not signed out.

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Access token returned by sign-in. Send it as Authorization: Bearer <token>.

Request Body

application/json
  1. body
currentPassword*string

The password currently set on the account.

newPassword*string

The new password, 8-128 characters.

Length8 <= length <= 128

Response Body

Password changed

application/json
  1. response
status*integer
success*boolean
message*string
data*unknown
Example Request
curl -X POST 'http://localhost:4000/api/v1/user/change-password' \  -H 'Content-Type: application/json' \  -d '{  "currentPassword": "S3cure-Passw0rd",  "newPassword": "N3w-S3cure-Passw0rd"}'
Example Response
{  "status": 200,  "success": true,  "message": "Password changed successfully.",  "data": null}