# Update End User

Update an end user's id, name, email, or metadata.

`PUT https://connect.mindcloud.co/v2/embedded/end-users/:endUserId`

Permissions: `embedded:edit`.

## Parameters

### Path

- `endUserId` (string, required): The end user's id, from List End Users or Create End User.

### Body

- `externalId` (string): Your own id for them.
- `name` (string): Their name.
- `email` (string): Their email address.
- `metadata` (object): The full new metadata. Replaces the current values.
  Host variables for credential exchange: { name: value }, each value a host label (letters, digits and hyphens, up to 63 characters), such as { "environment": "eu1" }.

## Example request

```bash
curl --request PUT \
  --url 'https://connect.mindcloud.co/v2/embedded/end-users/enduser_GhSUEYhipn4g' \
  --header 'Authorization: Bearer $MINDCLOUD_API_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
  "externalId": "cust_8842",
  "name": "Jordan Lee",
  "email": "jordan@customer.com",
  "metadata": {
    "environment": "eu1"
  }
}'
```

## Response fields

- `id` (string): Unique id of the end user. Use it in the end user routes, connect links, and the embedded MCP route.
- `externalId` (string): Your own id for them, such as the user id in your product.
- `name` (string): Their name.
- `email` (string): Their email address.
- `metadata` (object): Your values for them, used as credential-exchange host variables. Each value is a host label (letters, digits, hyphens).
- `createdOn` (date): When the end user was created.
- `updatedOn` (date): When they were last changed.
