# Operations with Specific NotificationSettings

This resource lets you work with the notification settings of your YouTrack service: read and configure Email server settings to enable notifications to users.
|  Resource  |     ```GENERIC /api/admin/globalSettings/notificationSettings ```    |
| --- | --- |
|  Returned entity  |  [NotificationSettings](api-entity-NotificationSettings.html). For the description of the entity attributes, see [Supported Fields](#NotificationSettings-supported-fields) section.  |
|  Supported methods  |      * `GET`: [Read a Specific NotificationSettings](#get-NotificationSettings-method).    * `POST`: [Update a Specific NotificationSettings](#update-NotificationSettings-method).    |

## NotificationSettings attributes

Represents the Notifications settings of the YouTrack service.

### Related Resources

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

* [Notification Settings](resource-api-admin-globalSettings-notificationSettings.html)

### Attributes

This table describes attributes of the `NotificationSettings` 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 NotificationSettings. `Read-only`.  |
|  emailSettings  |  [EmailSettings](api-entity-EmailSettings.html)  |  Settings for sending emails. `Read-only`.  |

## Read a Specific NotificationSettings

Read the Notification settings of your YouTrack service.

### Required permissions

Requires permissions: Low-level Admin Read

### Request syntax

```GENERIC
GET /api/admin/globalSettings/notificationSettings?{fields}
```

|  null  |  The database ID of NotificationSettings  |
| --- | --- |

### Request parameters

|  Parameter  |  Type  |  Description  |
| --- | --- | --- |
|  fields  |  String  |  A list of NotificationSettings 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/admin/globalSettings/notificationSettings?fields=emailSettings(isEnabled,host,port,mailProtocol,anonymous,login,from,replyTo)
```

#### Sample response body

```JSON
{
  "emailSettings": {
    "login": null,
    "from": "service@youtrack.cloud",
    "mailProtocol": "SMTP_TLS",
    "replyTo": null,
    "anonymous": false,
    "port": 587,
    "isEnabled": true,
    "host": "10.20.1.6",
    "$type": "EmailSettings"
  },
  "$type": "NotificationSettings"
}
```

## Update a Specific NotificationSettings

Change the Notification settings of your YouTrack service.

### Required permissions

Requires permissions: Low-level Admin Write

### Request syntax

```GENERIC
POST /api/admin/globalSettings/notificationSettings?{fields}
```

|  null  |  The database ID of NotificationSettings  |
| --- | --- |

### Request parameters

|  Parameter  |  Type  |  Description  |
| --- | --- | --- |
|  fields  |  String  |  A list of NotificationSettings 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/admin/globalSettings/notificationSettings?fields=emailSettings(isEnabled,from,replyTo)
```

#### Sample request body

```JSON
{
  "emailSettings": {
    "from": "youtrack@mycompany.com"
  }
}
```

#### Sample response body

```JSON
{
  "emailSettings": {
    "isEnabled": true,
    "from": "youtrack@mycompany.com",
    "replyTo": null,
    "$type": "EmailSettings"
  },
  "$type": "NotificationSettings"
}
```

