API reference / Accounts

post/v2/accounts/password-reset/confirm

Set a password from a mailed link

Operation
confirmPasswordReset
Authentication
None — public

Serves the reset a customer asked for and the invitation an operator sent: both set the password on an account. Redeeming also confirms the address, because opening a link mailed to it is proof of the inbox. Every live session for the account is revoked — a reset that leaves a stolen session alive has not reset anything. The link works once: its signature covers a digest of the password hash it was minted against.

Request

Body

tokenstringrequired
passwordstringrequired

Responses

200Password set. Sign in normally afterwards.
statusstringrequired
messagestringrequired
400The request body or query failed validation.
errorobjectrequired
401The link is not valid, has expired, or has already been used.
errorobjectrequired

Example

curl
curl -X POST https://api.haavisa.com/v2/accounts/password-reset/confirm \
  -H "Content-Type: application/json" \
  -d '{
    "token": "<token>",
    "password": "<password>"
  }'

More in Accounts

Something unclear? The eligibility guide explains the model behind the answers; the errors guide covers the envelope.