# Leave the end user's email address on a connection

> Leave the end user's email address on a connection: CustomDomain™ API reference in the connections group. Covers parameters, request body and responses.

Source: https://docs.customdomain.ai/docs/api-reference/connections/setConnectionEndUserEmail

## `PUT https://api.customdomain.ai/v1/connections/{id}/end-user-email`

The widget's optional "Get DNS updates by email" field. After a domain is set up, the end user can leave an address so they hear if its records ever need to change (one email, with the new records, sent on the platform's behalf).

A widget token for the connection's own application can set an address only while the connection has none: when one is already there (the platform's, or an earlier one) the answer is `409`, so a browser can never overwrite what the platform gave. A widget token bound to another end user than the connection's (`end_user_ref`) is refused with `403`: the reconnect email goes to this address and its link signs in as the connection's end user. An API key replaces any earlier address. The address is never echoed back and never logged.

Test domains refuse the call.

A share link's token never sets the address, on any connection: a link is a credential to set one domain up, not the end user, and the address receives the reconnect link that signs in as them.

### Authentication

`widgetJWT`, `apiKey`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |

### Request body (JSON)

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

### Responses

| Status | Description |
| --- | --- |
| `204` | Stored (or dropped while the feature is off) |
| `400` | Error envelope: {code, title, details, request_id}. |
| `401` | Error envelope: {code, title, details, request_id}. |
| `403` | Error envelope: {code, title, details, request_id}. |
| `404` | Error envelope: {code, title, details, request_id}. |
| `409` | Error envelope: {code, title, details, request_id}. |

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