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

# Update Customer Email

> Endpoint is used to update customer email.

```bash Request Example theme={null}
curl --request POST 'https://api.mayar.id/hl/v1/customer/update' \
--header 'Authorization: Bearer Paste-Your-API-Key-Here' \
--header 'Content-Type: application/json' \
--data-raw '{
   		"fromEmail": "mraihanna19@gmail.com",
   		"toEmail": "mraihannanewpatch@gmail.com"
}
'
```

```json Response Example 200 theme={null}
{
    "statusCode": 200,
    "messages": "sukses"
}
```

Endpoint:

```Production Production theme={null}
https://api.mayar.id/hl/v1/customer/update
```

```Sandbox Sandbox theme={null}
https://api.mayar.io/hl/v1/customer/update
```

## Authorization

**Authorization** `string` *required*

Example:

`Authorization | Bearer Paste-Your-API-Key-Here`

## Request Body

**fromEmail** `string` *required*

The email of the customer to be updated from.

**toEmail** `string` *required*

The new email of the customer.

## Response

Successful Response

### Main Structure (Root)

**statusCode** `integer`

Status code form API.

**messages** `string`

Status message that describes the status code.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.