2.0 ActionableNotification object

The actionable notification object is an extension of the 2.0 Notification object.

Just like the Notification object, it informs the client of a situation or event that has occurred, but unlike a regular notification, the actionable notification has a unique ID, plus a list of possible actions that the recipient may take upon the actionable notification.

Example

{
  "timestamp": "2015-06-12T07:16:23Z",
  "type": "FORWARDED_DRILL",
  "message": "French part 1",
  "explanation": {
    "text": "I wanted to share this drill with you.",
    "markup": [ {
      "type": "italic",
      "offset": 0,
      "length": 38
    } ]
  },
  "icon": {
    "type": "image/png",
    "url": "https://www.drillster.com/bin/attachment/5ade297ea4278d8aee39932cc8cfb74370577801",
    "width": 256,
    "height": 256
  },
  "id": "G9DoPrVyROC1jDkDiEoo2x",
  "actions": [ "IMPORT", "REMOVE" ]
}

Fields

An actionable notification may have all of the same fields of a regular 2.0 Notification, in addition to the below fields.

Field Type Description
id
required
String A unique ID which identifies this actionable notification.

Example value: G9DoPrVyROC1jDkDiEoo2x
actions
required
List of strings A list of possible actions that the recipient of the actionable notification may take.

An action is typically represented by a verb, using an upper case string. Underscores are used instead of spaces.

Actions are not predefined and may take any value. Some examples include:
  • IGNORE
  • ACCEPT
  • DECLINE
  • IMPORT
  • ACKNOWLEDGE