# Change email

`POST https://api.cryptohopper.com/v1/user/email`

Part of [Users](https://www.cryptohopper.com/api-documentation/api-reference/users.md) in the Cryptohopper API reference.

Starts a change of the user's email address. The user gets a confirmation email at the old and at the new address and must confirm both. One request per hour is allowed.

OAuth scope: `user`

code is the user's current two-factor code and may not be empty. Accounts without two-factor authentication accept any non-empty value. An address that already belongs to another account is refused.

## Headers

| Name | Type | Required | Description |
|---|---|---|---|
| `access-token` | string | yes | The OAuth access token of the user. |

## Request body

| Field | Type | Required | Description |
|---|---|---|---|
| `email` | string | no |  |

## Example request

```bash
curl -X POST "https://api.cryptohopper.com/v1/user/email" \
  -H "access-token: YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"email":"new@example.com","code":"123456"}'
```

## Response

Example response (illustrative values):

```json
{
    "data": "E-mail address change request initiated."
}
```

Status codes: 200. Errors return JSON with `status`, `error` and `message`, plus a numeric `code` when the error comes from the API itself rather than the gateway.
