Skip to content

Send Recovery Code

POST api/account/recovery-code

This is used to send the recovery code to the user’s email.

Example Request

Terminal window
curl -X 'POST' \
'http://localhost:8080/api/account/recovery-code' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"email": "johndoe@gmail.com",
}'

Request Body

Content Type: application/json
Content:

{
"email": "string"
}

Responses

200 - OK

The request was successful

Content Type: text/plain
Content:

Recovery code sent!

400 - Bad Request

Validation Error

Content Type: application/json
Content:

{
"param_name": [
"string"
],
}

401 - Unauthorized

The request requires valid bearer token, but none were provided, or the bearer token is invalid.

429 - Too Many Requests

The user has exceeded the rate limit of 5 requests in 10 minutes.

500 - Internal Server Error

There is an issue with the backend. Sentry will provide a more detailed report on the problem.