The sp-rest-explorer is a wonderful website to explore all the APIs available on SharePoint. You can find it at

For example, if you browse to web > Alert, you can see that the Alert has a method called Add with signature as _api/web/Alerts/Add(...)/. It takes as a parameter, alertCreationInformation which is of type SP.AlertCreationInformation.

And the SP.AlertCreationInformation properties as below.

Property             Type
AlertFrequency       Int32
AlertTemplateName    String
AlertTime            DateTime
AlertType            Int32
AlwaysNotify         Boolean
DeliveryChannels     Int32
EventType            Int32
EventTypeBitmask     Int32
Filter               String
Properties           Collection (SP.KeyValue)
Status               Int32
Title                String

You can post to the endpoint, _api/web/Alerts/Add with the payload

      "Filter":"<Query><And><Or><Eq><FieldRef Name=\"SomeField\"/><Value type=\"string\">Word</Value></Eq><Eq><FieldRef Name=\"SomeField\"/><Value type=\"string\">Excel</Value></Eq></Or><Or><Eq><FieldRef Name=\"SomeSkill\"/><Value type=\"string\">2 - Fortgeschritten</Value></Eq></Or></And></Query>",
      "Title":"My Filtered Notification",

AlertCreationInformation myNewAlert = new AlertCreationInformation();

// myNewAlert.Item = companylibrary.GetItemByUniqueId(alertfolder.UniqueId);
myNewAlert.List = clientContext.Web.Lists.GetByTitle(CompanyType);
myNewAlert.AlertFrequency = AlertFrequency.Immediate;
myNewAlert.AlertTime = DateTime.Now;
myNewAlert.AlertType = AlertType.List;
myNewAlert.AlwaysNotify = true;
myNewAlert.DeliveryChannels = AlertDeliveryChannel.Email;
myNewAlert.EventType = AlertEventType.All;
myNewAlert.Filter = "2";
// 0 = Anything Changes
// 1 = Someone else changes a document
// 2 = Someone else changes a document created by me
// 3 = Someone else changes a document modified by me

myNewAlert.Status = AlertStatus.On;
myNewAlert.Title = "My new alert created at : " + DateTime.Now.ToString();
myNewAlert.User = clientContext.Web.CurrentUser;

var newAlertGuid = clientContext.Web.CurrentUser.Alerts.Add(myNewAlert);


Additional Notes


Make sure to change the Content-type header as below

Content-Type: "application/json; odata=verbose"

If you receive the error The property '__metadata' does not exist on type xxxx, make sure you have set the content type above.

Function Endpoint

When you call a function endpoint, the payload needs to have the top attribute parameters.


Example of function endpoint is _api/web/Alerts/Add(...)/

Parameter Type

For every function call, you need to indicate the type of parameter you are passing. This is done by using the __metadata attribute. For example, to create a view, you need to pass ViewCreationInformation to the endpoint /_api/Web/Lists/GetByTitle('Listname')/Views/Add.



Whenever an attribute is specified as a collection, for example the ViewFields attribute of the ViewCreationInformation is of type Collection(String), it needs to be crafted in a specific format. Below is an example of how you will craft a collection attribute (ViewFields). Notice that you have to specify the attribute type using the __metadata attribute.


Other Resources
JavaScript API reference for SharePoint 2013 | Microsoft Docs