# Operations with Specific NotificationsUserProfile

This resource lets you read and update notification settings in the profile of the specific user.
|  Resource  |     ```GENERIC /api/users/{userID}/profiles/notifications ```    |
| --- | --- |
|  Returned entity  |  [NotificationsUserProfile](api-entity-NotificationsUserProfile.html). For the description of the entity attributes, see [Supported Fields](#NotificationsUserProfile-supported-fields) section.  |
|  Supported methods  |      * `GET`: [Read a Specific NotificationsUserProfile](#get-NotificationsUserProfile-method).    * `POST`: [Update a Specific NotificationsUserProfile](#update-NotificationsUserProfile-method).    |

## NotificationsUserProfile attributes

Represents the notification settings in the profile of the specific user.

### Related Resources

Below you can find the list of resources that let you work with this entity.

* [Notifications User Profile](resource-api-users-userID-profiles-notifications.html)

### Attributes

This table describes attributes of the `NotificationsUserProfile` entity.

* To receive an attribute in the response from the server, specify it explicitly in the `fields` request parameter.

* To update an attribute, provide it in the body of a POST request.

|  Field  |  Type  |  Description  |
| --- | --- | --- |
|  id  |  String  |  The ID of the NotificationsUserProfile. `Read-only`.  |
|  notifyOnOwnChanges  |  Boolean  |  Indicates whether the user receives notifications on their own changes.  |
|  emailNotificationsEnabled  |  Boolean  |  Indicates whether the user enabled notifications via email.  |
|  mentionNotificationsEnabled  |  Boolean  |  Indicates whether the user receives notifications when they is mentioned in issue text.  |
|  duplicateClusterNotificationsEnabled  |  Boolean  |  Indicates whether the user receives notifications about issue's duplicates.  |
|  mailboxIntegrationNotificationsEnabled  |  Boolean  |  Indicates whether the user receives notifications produced by mailbox integration.  |
|  usePlainTextEmails  |  Boolean  |  Indicates whether the user receives emails in plain text.  |
|  autoWatchOnComment  |  Boolean  |  Indicates whether the user is automatically subscribed to the issue or article updates when they leave a comment.  |
|  autoWatchOnCreate  |  Boolean  |  Indicates whether the user is automatically subscribed to the issue or article updates when they create it.  |
|  autoWatchOnVote  |  Boolean  |  Indicates whether the user is automatically subscribed to the issue updates when they vote for the issue.  |
|  autoWatchOnUpdate  |  Boolean  |  Indicates whether the user is automatically subscribed to the issue or article updates when they update it.  |

## Read a Specific NotificationsUserProfile

Get notification settings of the specific user profile.

### Required permissions

Requires Read Self to read own profile and Read User Full to read profile of another user.

### Request syntax

```GENERIC
GET /api/users/{userID}/profiles/notifications/{profileID}?{fields}
```

|  {profileID}  |  The database ID of NotificationsUserProfile  |
| --- | --- |

### Request parameters

|  Parameter  |  Type  |  Description  |
| --- | --- | --- |
|  fields  |  String  |  A list of NotificationsUserProfile attributes that should be returned in the response. If no field is specified, only the `entityID` is returned.  |

### Sample

#### Sample request

```CURL
https://example.youtrack.cloud/api/users/1-2/profiles/notifications?fields=id,notifyOnOwnChanges,emailNotificationsEnabled,mentionNotificationsEnabled,duplicateClusterNotificationsEnabled,mailboxIntegrationNotificationsEnabled,usePlainTextEmails,autoWatchOnComment,autoWatchOnVote,autoWatchOnUpdate
```

#### Sample response body

```JSON
{
  "emailNotificationsEnabled": true,
  "autoWatchOnComment": true,
  "autoWatchOnUpdate": false,
  "autoWatchOnVote": true,
  "notifyOnOwnChanges": false,
  "mailboxIntegrationNotificationsEnabled": true,
  "usePlainTextEmails": false,
  "mentionNotificationsEnabled": true,
  "duplicateClusterNotificationsEnabled": false,
  "id": "notificationsProfile",
  "$type": "NotificationsUserProfile"
}
```

## Update a Specific NotificationsUserProfile

Change notification settings in the specific user profile.

### Required permissions

Requires Update Self to update own profile and Update User to update profile of another user.

### Request syntax

```GENERIC
POST /api/users/{userID}/profiles/notifications/{profileID}?{fields}
```

|  {profileID}  |  The database ID of NotificationsUserProfile  |
| --- | --- |

### Request parameters

|  Parameter  |  Type  |  Description  |
| --- | --- | --- |
|  fields  |  String  |  A list of NotificationsUserProfile attributes that should be returned in the response. If no field is specified, only the `entityID` is returned.  |

### Sample

Let's disable notifications from a mailbox integrations for the user.

#### Sample request

```CURL
https://example.youtrack.cloud/api/users/1-2/profiles/notifications?fields=emailNotificationsEnabled,mailboxIntegrationNotificationsEnabled
```

#### Sample request body

```JSON
{
  "mailboxIntegrationNotificationsEnabled": false
}
```

#### Sample response body

```JSON
{
  "emailNotificationsEnabled": true,
  "mailboxIntegrationNotificationsEnabled": false,
  "$type": "NotificationsUserProfile"
}
```

