Search…
Notifications
Notification objects are either automatically created as a result of connection invitations or manually created via the Custom Notifications section on the admin portal.
Through the administration interface at https://app.dev.medable.com/{your_org_name}/settings/notifications, notifications can be enabled, disabled, or based on org members’ preferences.
In conjuction with the scripting api, custom notifications can be configured for multiple endpoints and sent via script (e.g. require("notifications").send("c_my_notif"); ).
An Organization can setup an app for Apple Push Notification Service (APNs) and Google Cloud Messaging (GCM), and users can set preferences for how to receive notifications, through APNs, via email or through SMS for custom notifications.
Notifications are automatically cleared for connection invitations when they are retrieved using the API. Otherwise, clients should manually clear them using the notifications API.
_id ObjectId
The notification identifier.
context Reference
The context for which the notification was created.
created Date
The date the notification was created. Notifications that are not acknowledged expire after 30 days.
meta Any
An object containing notification metadata. For post updates, for example, it contains the postId and postType. For comments, it also contains the commentId.
object String
The object name (notification).
type ObjectId
The notification type (See Consts for the standard notification type _ids)
1
{
2
"_id": "55238637b9b285167a241439",
3
"context": {
4
"_id": "5519c01aae2fd2b02915c81f",
5
"object": "c_example",
6
"path": "/c_examples/5519c01aae2fd2b02915c81f"
7
},
8
"meta": {
9
"postId": "55238637a033479c18311c6e",
10
"type": "c_post"
11
},
12
"object": "notification",
13
"type": "4e66204665656473506f7374"
14
}
Copied!
get
https://api.dev.medable.com/
your_org_name/v2/notifications
List
1
$.ajax({
2
url: "https://api.dev.medable.com/example/v2/notifications",
3
method: "GET",
4
dataType : "json",
5
xhrFields: {
6
withCredentials: true
7
},
8
headers: {
9
"Medable-Client-Key": "GsAqlhnIMzrDeD8V2MBQWq"
10
}
11
}).done(function(data) {
12
// ...
13
});
Copied!
get
https://api.dev.medable.com/
your_org_name/v2/notifications/notification_id
Read
1
$.ajax({
2
url: "https://api.dev.medable.com/example/v2/notifications/55238637b9b285167a241439",
3
method: "GET",
4
dataType : "json",
5
xhrFields: {
6
withCredentials: true
7
},
8
headers: {
9
"Medable-Client-Key": "GsAqlhnIMzrDeD8V2MBQWq"
10
}
11
}).done(function(data) {
12
// ...
13
});
Copied!
patch
https://api.dev.medable.com/
your_org_name/v2/notifications/notification_id
Clear (one)
1
$.ajax({
2
url: "https://api.dev.medable.com/example/v2/notifications/55238af0b9b285167a2414c8",
3
method: "DELETE",
4
dataType : "json",
5
xhrFields: {
6
withCredentials: true
7
},
8
headers: {
9
"Medable-Client-Key": "GsAqlhnIMzrDeD8V2MBQWq"
10
}
11
}).done(function(data) {
12
// ...
13
});
Copied!
patch
https://api.dev.medable.com
/your_org_name/v2/notifications/object_name/object_id
Clear (many)
1
$.ajax({
2
url: "https://api.dev.medable.com/example/v2/notifications/c_examples/5519c01aae2fd2b02915c81f?type=4e6620436e6e637443727464",
3
method: "DELETE",
4
dataType : "json",
5
xhrFields: {
6
withCredentials: true
7
},
8
headers: {
9
"Medable-Client-Key": "GsAqlhnIMzrDeD8V2MBQWq"
10
}
11
}).done(function(data) {
12
// ...
13
});
Copied!
Last modified 1mo ago