> For the complete documentation index, see [llms.txt](https://docs.tnid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tnid.com/api-reference/001_user/002_email/005__update_user_email.md).

# Update User Email

GraphQL endpoint: `/user`

Updates the types and visibility settings of an existing user email. The email address itself cannot be changed, only its metadata like types and visibility.

## Query

```graphql
mutation (
  $id: ID!
  $types: [UserEmailType!]
  $visibility: [UserVisibilityType!]
) {
  updateUserEmail (
    id: $id
    types: $types
    visibility: $visibility
  ) {
    id
    email
    types
    visibility
  }
}

```

## Variables

```json
{
  "id": "00000000-0000-4000-8000-000000000001",
  "types": [
    "HOME"
  ],
  "visibility": [
    "FAMILY"
  ]
}
```

## Response

```json
{
  "data": {
    "updateUserEmail": {
      "email": "test1@email.com",
      "id": "00000000-0000-4000-8000-000000000001",
      "types": [
        "HOME"
      ],
      "visibility": [
        "FAMILY"
      ]
    }
  }
}
```
