# Email Verification

## Verify Email API

The Verify Email API is a versatile endpoint used in various stages of the e-commerce application, such as user registration, checkout, and profile updates. This API enables users to verify their email addresses by sending a one-time password (OTP) to the provided email. The email verification process ensures the accuracy and validity of user-provided email addresses, enhancing the security and trustworthiness of user accounts.

<figure><img src="https://3686328336-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fd1Iq7THDAagTQzeC9rTN%2Fuploads%2FS2x4KNgVhOQAhs17GxvI%2Fimage.png?alt=media&#x26;token=5a2cbf43-15f0-4eda-8175-f751c9a82d71" alt=""><figcaption><p><strong>Email verification interface</strong></p></figcaption></figure>

### Endpoint

* `{{baseurl}}/api/v1/customer/verify-email`

### **Method**

* **POST**

### **Request Parameters:**

* None

### **Request Body**

```json
{
  "email_otp": "otp_example"
}
```

### **Response Format:**&#x20;

The API responds with a JSON object containing the verification status and any relevant information.

```json
{
    "status": true,
    "message": "Email verification successfully completed",
    "data": {
        "user": []
    }
}
```

**Authorization:** The API requires a valid Bearer token in the request headers to authorize the user.

**Features:**

* The API initiates the email verification process for the provided email address.
* Users receive a one-time password (OTP) to their email for verification.
* Users must enter the OTP to verify the authenticity of their email address.

### Usage

The Verify Email API is utilized when users need to verify their email addresses, typically during the registration process or when updating their account settings.

###

## Resend Email OTP API

The Resend Email OTP API allows users to request a new one-time password (OTP) for email verification. This API is utilized when users need to request a resend of the email OTP, typically when the initial OTP has expired or not been received.

### Endpoint

* `{{baseurl}}/api/v1/customer/resend-email-otp`

### **Method**

* **GET**

### **Request Parameters**

* None

### **Request Body**

* None

### **Response Format**

&#x20;The API responds with a JSON object containing the status of the OTP resend request.

```json
    "status": true,
    "message": "OTP sent to your email id",
    "data": {
        "user": []
    }
```

### **Authorization**

The API requires a valid Bearer token in the request headers to authorize the user.

### **Features**

* The API allows users to request a resend of the email OTP if they did not receive it or if it has expired.
* Users receive a new OTP to their email for verification.

### Usage

The Resend Email OTP API is used when users need to request a new OTP for email verification, typically when the initial OTP has expired or not been received.
