Use this API to retrieve and update notification settings globally for your account, or for an individual group or project, which overrides the global setting.
Retrieve notification settings for a group
GET /api/v4/groups/{id}/notification_settings
Retrieves the notification level for a specified group. For the custom level, the response also includes an events object with the setting of each notification event: true if the notification is turned on, false if it is turned off, and null if it uses the default setting.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
401 | Unauthorized | — |
404 | Not Found | — |
Update notification settings for a group
PUT /api/v4/groups/{id}/notification_settings
Updates the notification settings for a specified group. The response includes the notification level. For the custom level, the response also includes an events object with the setting of each notification event: true if the notification is turned on, false if it is turned off, and null if it uses the default setting.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
change_ | Boolean | Turn on notifications when a merge request’s reviewer is changed |
close_ | Boolean | Turn on notifications when an issue is closed |
close_ | Boolean | Turn on notifications when a merge request is closed |
failed_ | Boolean | Turn on notifications when a pipeline fails |
fixed_ | Boolean | Turn on notifications when a previously failed pipeline is fixed |
issue_ | Boolean | Turn on notifications when an issue is due tomorrow |
level | String | The group notification level |
merge_ | Boolean | Turn on notifications when a merge request is merged |
merge_ | Boolean | Turn on notifications when a merge request is set to auto- |
moved_ | Boolean | Turn on notifications when a project is moved |
new_ | Boolean | Turn on notifications when a new epic is created. |
new_ | Boolean | Turn on notifications when a new issue is created |
new_ | Boolean | Turn on notifications when a new merge request is created |
new_ | Boolean | Turn on notifications when a new comment is added |
new_ | Boolean | Turn on notifications when a new release is published |
push_ | Boolean | Turn on notifications when someone pushes to a merge request |
reassign_ | Boolean | Turn on notifications when an issue is reassigned |
reassign_ | Boolean | Turn on notifications when a merge request is reassigned |
reopen_ | Boolean | Turn on notifications when an issue is reopened |
reopen_ | Boolean | Turn on notifications when a merge request is reopened |
success_ | Boolean | Turn on notifications when a pipeline completes successfully |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad request | — |
401 | Unauthorized | — |
404 | Not Found | — |
Retrieve global notification settings
GET /api/v4/notification_settings
Retrieves the global notification level and email address.
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
401 | Unauthorized | — |
Update global notification settings
PUT /api/v4/notification_settings
Updates notification settings and email address.
Request body (application/json)
| Property | Type | Description |
|---|---|---|
change_ | Boolean | Turn on notifications when a merge request’s reviewer is changed |
close_ | Boolean | Turn on notifications when an issue is closed |
close_ | Boolean | Turn on notifications when a merge request is closed |
failed_ | Boolean | Turn on notifications when a pipeline fails |
fixed_ | Boolean | Turn on notifications when a previously failed pipeline is fixed |
issue_ | Boolean | Turn on notifications when an issue is due tomorrow |
level | String | Global notification level |
merge_ | Boolean | Turn on notifications when a merge request is merged |
merge_ | Boolean | Turn on notifications when a merge request is set to auto- |
moved_ | Boolean | Turn on notifications when a project is moved |
new_ | Boolean | Turn on notifications when a new epic is created. |
new_ | Boolean | Turn on notifications when a new issue is created |
new_ | Boolean | Turn on notifications when a new merge request is created |
new_ | Boolean | Turn on notifications when a new comment is added |
new_ | Boolean | Turn on notifications when a new release is published |
notification_ | String | Email address where notifications are sent |
push_ | Boolean | Turn on notifications when someone pushes to a merge request |
reassign_ | Boolean | Turn on notifications when an issue is reassigned |
reassign_ | Boolean | Turn on notifications when a merge request is reassigned |
reopen_ | Boolean | Turn on notifications when an issue is reopened |
reopen_ | Boolean | Turn on notifications when a merge request is reopened |
success_ | Boolean | Turn on notifications when a pipeline completes successfully |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad request | — |
401 | Unauthorized | — |
Retrieve notification settings for a project
GET /api/v4/projects/{id}/notification_settings
Retrieves the notification level for a specified project. For the custom level, the response also includes an events object with the setting of each notification event: true if the notification is turned on, false if it is turned off, and null if it uses the default setting.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
401 | Unauthorized | — |
404 | Not Found | — |
Update notification settings for a project
PUT /api/v4/projects/{id}/notification_settings
Updates the notification settings for a specified project. The response includes the notification level. For the custom level, the response also includes an events object with the setting of each notification event: true if the notification is turned on, false if it is turned off, and null if it uses the default setting.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String | ID or URL- |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
change_ | Boolean | Turn on notifications when a merge request’s reviewer is changed |
close_ | Boolean | Turn on notifications when an issue is closed |
close_ | Boolean | Turn on notifications when a merge request is closed |
failed_ | Boolean | Turn on notifications when a pipeline fails |
fixed_ | Boolean | Turn on notifications when a previously failed pipeline is fixed |
issue_ | Boolean | Turn on notifications when an issue is due tomorrow |
level | String | The project notification level |
merge_ | Boolean | Turn on notifications when a merge request is merged |
merge_ | Boolean | Turn on notifications when a merge request is set to auto- |
moved_ | Boolean | Turn on notifications when a project is moved |
new_ | Boolean | Turn on notifications when a new epic is created. |
new_ | Boolean | Turn on notifications when a new issue is created |
new_ | Boolean | Turn on notifications when a new merge request is created |
new_ | Boolean | Turn on notifications when a new comment is added |
new_ | Boolean | Turn on notifications when a new release is published |
push_ | Boolean | Turn on notifications when someone pushes to a merge request |
reassign_ | Boolean | Turn on notifications when an issue is reassigned |
reassign_ | Boolean | Turn on notifications when a merge request is reassigned |
reopen_ | Boolean | Turn on notifications when an issue is reopened |
reopen_ | Boolean | Turn on notifications when a merge request is reopened |
success_ | Boolean | Turn on notifications when a pipeline completes successfully |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad request | — |
401 | Unauthorized | — |
404 | Not Found | — |
Schemas
Objects returned by the operations above and objects nested in their request bodies.
APIEntitiesGlobalNotificationSetting
| Property | Type | Description |
|---|---|---|
events | String | — |
level | String | Notification level Allowed values: global,watch,participating,mention,disabled,customExample: participating |
notification_ | String | Email address where notifications are sent Example: user@example. |
APIEntitiesNotificationSetting
| Property | Type | Description |
|---|---|---|
events | String | — |
level | String | Notification level Allowed values: global,watch,participating,mention,disabled,customExample: participating |