# A member's email change was confirmed (console server)

> A member's email change was confirmed (console server): CustomDomain™ API reference in the members group. Covers parameters, request body and responses.

Source: https://docs.customdomain.ai/docs/api-reference/members/memberEmailChanged

## `POST https://api.customdomain.ai/v1/members:email-changed`

The console's server calls this once a person's email change is confirmed, guarded by the provision secret like `POST /tenants:provision`. `email` is the member's new address. With `old_email`, the control plane moves the person's member row in that workspace to it and says how many rows it moved in `updated`; without it, the row is taken as already moved. It may also update related records, best effort.

### Authentication

`provisionSecret`

### Request body (JSON)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `tenant_id` | string | yes |  |
| `email` | string | yes | The member's new address. Lower cased by the control plane. |
| `old_email` | string | no | The member's previous address. |
| `user_id` | string | no | The person's id in the calling application. |

### Responses

| Status | Description |
| --- | --- |
| `200` | Accepted |
| `400` | Error envelope: {code, title, details, request_id}. |
| `401` | Error envelope: {code, title, details, request_id}. |

### `200` response body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `ok` | boolean | yes |  |
| `updated` | integer | no | Member rows moved to `email`, 0 or 1. Present when `old_email` was sent. |

The full specification is served at `GET https://api.customdomain.ai/v1/openapi.json`.
