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

# Verify Email OTP

> Verify the OTP sent to user email address

# Verify Email OTP

Verifies the 6-digit OTP sent to the user's email address.

<ParamField path="userId" type="string" required>
  The unique user ID
</ParamField>

<ParamField body="otp" type="string" required>
  The 6-digit OTP received via email
</ParamField>

## Request

```bash theme={null}
curl -X POST https://api.stablepay.global/v2/users/usr_abc123/verify/email/confirm \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "otp": "123456"
  }'
```

## Response

```json theme={null}
{
  "success": true,
  "message": "Email verified successfully",
  "data": {
    "emailVerified": true,
    "verifiedAt": "2025-06-15T10:30:00.000Z"
  }
}
```

<Note>
  * Maximum **3 verification attempts** per OTP
  * After 3 failed attempts, request a new OTP
  * OTP expires after 10 minutes
</Note>

## Errors

| Code               | Description                             |
| ------------------ | --------------------------------------- |
| `Not Found`        | User not found                          |
| `Already Verified` | Email is already verified               |
| `No OTP Found`     | No pending OTP found. Request a new one |
| `Max Attempts`     | Maximum attempts exceeded               |
| `Invalid OTP`      | OTP is incorrect or expired             |

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "message": "Email verified successfully",
    "data": {
      "emailVerified": true,
      "verifiedAt": "2025-06-15T10:30:00.000Z"
    }
  }
  ```

  ```json 400 theme={null}
  {
    "error": "Invalid OTP",
    "message": "Invalid OTP",
    "attemptsRemaining": 2
  }
  ```

  ```json 400 theme={null}
  {
    "error": "Max Attempts",
    "message": "Maximum attempts exceeded. Please request a new OTP."
  }
  ```
</ResponseExample>
