Skip to main content

Endpoint

POST /api/users/verify-reset-code

Request Body

email
string
required
The email address associated with the account.
resetCode
string
required
The 6-digit reset code received from the forgot-password endpoint.

Response

Success response (200 OK)
message
string
Confirmation message: “Reset code verified”
userId
integer
The unique ID of the user whose reset code was verified

Example Request

curl -X POST https://api.mediguide.com/api/users/verify-reset-code \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "resetCode": "123456"
  }'

Example Response

{
  "message": "Reset code verified",
  "userId": 42
}

Error Responses

401 Unauthorized - Invalid Reset Code

{
  "error": "Código de recuperación inválido"
}
This error is returned when:
  • The email and reset code combination does not exist
  • The reset code does not match the one stored for the email

401 Unauthorized - Expired Reset Code

{
  "error": "El código de recuperación ha expirado"
}
This error is returned when the reset code has expired (more than 30 minutes old).

500 Internal Server Error

{
  "error": "Error message details"
}

Build docs developers (and LLMs) love