Skip to content

Request a password reset code

POST
/v1/auth/forgot-password
curl --request POST \
--url https://api.emite.cr/v1/auth/forgot-password \
--header 'Content-Type: application/json' \
--data '{ "email": "ventas@emite.cr" }'

Starts the password recovery: when the email belongs to an EmiteCR account, sends it a 6-digit code, valid for 15 minutes, for POST /v1/auth/reset-password. Answers 202 at once, whether or not the email belongs to an account, so neither the response nor its timing reveals which ones exist: the code is created and emailed after the answer. Per account, at most one code every 60 seconds: a request within that window sends nothing (the code already sent still works) and answers 202 too.

Media typeapplication/json
object
email
required

Email of the account. The reset code is sent only when it belongs to an EmiteCR account, and the 202 answer is the same either way.

string
Example
ventas@emite.cr

Accepted; the same answer whether or not the email has an account.

Media typeapplication/json
object
email
required

The email the request named, echoed back. The answer is the same whether or not it belongs to an account, so it reveals nothing; when it does, the 6-digit reset code went there.

string
Example
{
"email": "ventas@emite.cr"
}