Subscribers - Update
Update delivery preferences of a notifications subscriber.
PATCH https://{service}dev.azure.com/{organization}/_apis/notification/subscribers/{subscriberId}?api-version=7.1
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
subscriber
|
path | True |
string (uuid) |
ID of the user or group. |
organization
|
path |
string |
The name of the Azure DevOps organization. |
|
service
|
path |
string |
The service to which this request is directed. |
|
api-version
|
query | True |
string |
Version of the API to use. This should be set to '7.1' to use this version of the api. |
Request Body
Name | Type | Description |
---|---|---|
deliveryPreference |
New delivery preference for the subscriber (indicates how the subscriber should be notified). |
|
preferredEmailAddress |
string |
New preferred email address for the subscriber. Specify an empty string to clear the current address. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
successful operation |
Security
oauth2
Type:
oauth2
Flow:
accessCode
Authorization URL:
https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token URL:
https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer
Scopes
Name | Description |
---|---|
vso.notification_write | Provides read/write access to subscriptions and read access to event metadata, including filterable field values. |
Examples
Sample request
PATCH https://dev.azure.com/_apis/notification/subscribers/{subscriberId}?api-version=7.1
{
"deliveryPreference": "noDelivery"
}
Sample response
{
"id": "564ee205-403f-44ab-a6e0-cd587632df8a",
"deliveryPreference": "noDelivery",
"flags": "deliveryPreferencesEditable, supportsPreferredEmailAddressDelivery, supportsEachMemberDelivery, supportsNoDelivery, isGroup, isTeam"
}
Definitions
Name | Description |
---|---|
Notification |
A subscriber is a user or group that has the potential to receive notifications. |
Notification |
Indicates how the subscriber should be notified by default. |
Notification |
Updates to a subscriber. Typically used to change (or set) a preferred email address or default delivery preference. |
Subscriber |
NotificationSubscriber
A subscriber is a user or group that has the potential to receive notifications.
Name | Type | Description |
---|---|---|
deliveryPreference |
Indicates how the subscriber should be notified by default. |
|
flags | ||
id |
string (uuid) |
Identifier of the subscriber. |
preferredEmailAddress |
string |
Preferred email address of the subscriber. A null or empty value indicates no preferred email address has been set. |
NotificationSubscriberDeliveryPreference
Indicates how the subscriber should be notified by default.
Value | Description |
---|---|
eachMember |
Deliver notifications to each member of the group representing the subscriber. Only applicable when the subscriber is a group. |
noDelivery |
Do not send notifications by default. Note: notifications can still be delivered to this subscriber, for example via a custom subscription. |
preferredEmailAddress |
Deliver notifications to the subscriber's preferred email address. |
useDefault |
Use default |
NotificationSubscriberUpdateParameters
Updates to a subscriber. Typically used to change (or set) a preferred email address or default delivery preference.
Name | Type | Description |
---|---|---|
deliveryPreference |
New delivery preference for the subscriber (indicates how the subscriber should be notified). |
|
preferredEmailAddress |
string |
New preferred email address for the subscriber. Specify an empty string to clear the current address. |
SubscriberFlags
Value | Description |
---|---|
deliveryPreferencesEditable |
Subscriber's delivery preferences could be updated |
isGroup |
Subscriber is a group |
isTeam |
Subscriber is a team |
isUser |
Subscriber is a user |
none | |
supportsEachMemberDelivery |
Subscriber's delivery preferences supports individual members delivery(group expansion) |
supportsNoDelivery |
Subscriber's delivery preferences supports no delivery |
supportsPreferredEmailAddressDelivery |
Subscriber's delivery preferences supports email delivery |