> ## Documentation Index
> Fetch the complete documentation index at: https://docs.contafy.com.mx/llms.txt
> Use this file to discover all available pages before exploring further.

# Forgot Password

> Request a password reset email

Initiates the password reset process by sending a reset token to the user's registered email address. The user can then use this token to set a new password.

## Authentication

No authentication required.

## Request Body

<ParamField body="email" type="string" required>
  Registered email address for the account that needs password reset.
</ParamField>

## Response

<ResponseField name="message" type="string">
  Success message confirming the reset email has been sent.
</ResponseField>

## Example Request

```bash theme={null}
curl -X POST https://api.contafy.com/api/auth/forgot-password \
  -H "Content-Type: application/json" \
  -d '{
    "email": "usuario@ejemplo.com"
  }'
```

## Example Response

```json theme={null}
{
  "message": "Si el email existe en nuestro sistema, recibirás instrucciones para restablecer tu contraseña"
}
```

## Error Responses

<ResponseField name="error" type="string">
  Error type identifier.
</ResponseField>

<ResponseField name="message" type="string">
  Human-readable error message.
</ResponseField>

### Common Errors

**400 Bad Request**

```json theme={null}
{
  "error": "VALIDATION_ERROR",
  "message": "Email es requerido"
}
```

**400 Bad Request**

```json theme={null}
{
  "error": "VALIDATION_ERROR",
  "message": "El formato del email es inválido"
}
```

**429 Too Many Requests**

```json theme={null}
{
  "error": "RATE_LIMIT_EXCEEDED",
  "message": "Demasiadas solicitudes. Por favor intenta más tarde"
}
```

## Notes

* For security reasons, the API returns a success message regardless of whether the email exists
* Password reset tokens typically expire after 1 hour
* Rate limiting is applied to prevent abuse
* Only the most recent reset token is valid; requesting a new one invalidates previous tokens
