---
# System prepended metadata

title: Email Validation

---

# Email Validation

## Requirements

* All customers must have an email address.
* Email addresses must be verified before some transactions (such as credit, overdraft accounts).
* Customers can initiate email verification.
* Email verification can only be done with strong customer authentication(SCA - 2 Factor Authentication)
* The e-mail verification process should be integrated with expert systems.

## Obtaining Email Address From Customer Who Do Not Have Email Address

In general, all customers are expected to have an email address and to have their address verified.

If any customer does not have an e-mail address, this email address is obtained during the login process of the mobile application.

* If logged user does not have an email, app displays email input form to customer.
    * The customer can postpone entering the e-mail address for a specified number of times.
* After email is entered. The system sends **Email Verification** email to customer.

In addition, users whose e-mail addresses have not been verified can be reminded periodically to verify.

## Email Verification Email

E-mail verification email contains;
* 4 digit code to verify email address
    * Code has to be valid desired duration (ex: 1 hour)
* Deeplink to mobile app to open email verification page
    * Customers can also open the email verification page directly from the menu.
* Information about email validation process


## Technical

### Validation Email Address

With this service, related email address is tagged as **ValidatedBySCA** in CIF(customer database)

:::warning
There may be maximum three verification attempts for each verification email code.
:::


#### Request
```haskell
PATCH https://api.burgan.com.tr/..../mail/{email-address}/validate/sca
Content-Type: application/json; charset=utf-8
{
    "code":"5244"
}
```

#### Responses
```
HTTP/1.1 200 OK

Email address validated successfully.
```

```
HTTP/1.1 404 OK

Email address not found.
```

```
HTTP/1.1 400 OK

Code is not valid. 
|
Code is expired.
|
Too many validation attempts
```
 
```
HTTP/1.1 409 OK

The email address already validated.
```


### Send Validation Email

#### Request
```haskell
POST https://api.burgan.com.tr/..../mail/{email-address}/validate/send-validation-mail
Content-Type: application/json; charset=utf-8
```

#### Responses

```
HTTP/1.1 200 OK

Validation email sent successfully.
```


```
HTTP/1.1 404 OK

Email address not found.
```



### Check Email Address Validation Status

#### Request
```haskell
GET https://api.burgan.com.tr/..../mail/{email-address}/validate/sca
```

#### Responses

```
HTTP/1.1 200 OK

{
  "is-validated-by-sca": true | false
}
```


```
HTTP/1.1 404 OK

Email address not found.
```
