Replaces the notification events the caller subscribes to, as submitting the console's Notification settings does: templateIds lists every event to keep or add, and every other one is dropped.
Reference
POST https://YOUR-NETWORK-DOMAIN/rest-api/notification-settings/subscriptions.do
Replaces the notification events the caller subscribes to, as submitting the console's Notification settings does: templateIds lists every event to keep or add, and every other one is dropped. Send templateIds empty to unsubscribe from all. Only the events the GET lists can be chosen.
Form Params
templateIdsarray<string>required
Ids of the notification events to subscribe to, comma-separated or repeated; empty to unsubscribe from all
3,7
Responses
200
The settings after the change, in the shape of the GET
400
templateIds is missing, or names an event users cannot subscribe to
401
Authentication error
403
The role skips all notifications, or has no view rights on campaigns or inventory
using var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://YOUR-NETWORK-DOMAIN/rest-api/notification-settings/subscriptions.do");
request.Headers.Add("X-Api-Key", "YOUR_API_KEY");
request.Content = new FormUrlEncodedContent(new Dictionary<string, string> { ["templateIds"] = "3,7" });
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());