Skip to content

Change the password

POST
/v1/auth/change-password
curl --request POST \
--url https://api.emite.cr/v1/auth/change-password \
--header 'Content-Type: application/json' \
--data '{ "currentPassword": "S3guroPass!", "newPassword": "café lluvia tortuga" }'

Changes the password of the signed-in person; requires the current password. Closes every OTHER session of the person (and unlinks their WhatsApp number). This session continues under a new token, returned in the X-Session-Token header.

Media typeapplication/json
object
currentPassword
required

The current password of the account. A wrong one answers 400 INVALID_CURRENT_PASSWORD.

string
Example
S3guroPass!
newPassword
required

The new password, different from the current one (400 SAME_PASSWORD). A password the person chooses: 12 to 72 characters, not built on the name or the email of the account, and hard to guess (no common or leaked password, sequence, keyboard pattern or date; the same estimator the app shows under the field). Upper case, digits and symbols are neither required nor refused. Refused with 400 PASSWORD_TOO_WEAK, whose params.reason is too_short, too_long, personal_info or too_guessable. Passwords set before this rule keep working to sign in.

string
>= 12 characters <= 72 characters
Example
café lluvia tortuga