Notification

Notification objects have a polymorphic structure. They can be of various types and each type has a certain set of actions that describe the notification further.

Notification content (specifically resource and context fields) varies based on the value of type field. These variations and their details are described in the table below.

TypeActionsContextResourceDescription
workspace.projectactivated
archived
deleted
ownership_transferred
-Project (extra: { name, platform })Used for changes related to projects in a workspace.
workspace.styleguideactivated
archived
deleted
ownership_transferred
-Styleguide (extra: { name, platform })Used for changes related to styleguides in a workspace.
workspace.organization.memberrole_updated
invited
Organization (extra: { name })OrganizationMember (extra: { role })Used for changes related to members of a workspace.
project.screencreated
version_created
deleted
Project (extra: { name, platform })
ScreenVersion (extra: { image_url, thumbnails, width, height })
Screen (extra: { name })Used for changes related to screens in a project.
project.screen.notecreated
mentioned
Project (extra: { name, platform })
Screen (extra: { name })
ScreenNoteComment (extra: { content })
Screen (extra: { order, color, status })Used for changes related to notes.
project.screen.note.commentcreated
mentioned
Project (extra: { name, platform })
Screen (extra: { name })
Screen (extra: { order, color, status })
ScreenNoteComment (extra: { content })Used for changes related to note comments.
project.colorcreated
updated
deleted
Project (extra: { name, platform })Color (extra: { name, r, g, b, a })Used for changes related to colors in a project.
project.text_stylecreated
updated
deleted
Project (extra: { name, platform })TextStyle (extra: { name })Used for changes related to text styles in a project.
project.componentcreated
version_created
deleted
Project (extra: { name, platform })Component (extra: { name })Used for changes related to components in a project.
project.spacing_tokencreated
updated
deleted
Project (extra: { name, platform })SpacingToken (extra: { name, value })Used for changes related to spacing tokens in a project.
project.memberjoinedProject (extra: { name, platform })Used for changes related to members of a project.
project.extensionadded
removed
Project (extra: { name, platform })Extension (extra: { name })Used for changes related to extensions in a project.
project.slack_integrationaddedProject (extra: { name, platform })SlackIntegration (extra: { channel })Used for changes related to slack intgrations in a project.
project.jira_attachmentadded
removed
Project (extra: { name, platform })JiraIntegration (extra: { issue })Used for changes related to jira attachments in a project.
project.screen.jira_attachmentadded
removed
Project (extra: { name, platform })
Screen (extra: { name })
JiraIntegration (extra: { issue })Used for changes related to jira attachments in a screen.
project.screen_section.jira_attachmentadded
removed
Project (extra: { name, platform })
ScreenSection (extra: { name })
JiraIntegration (extra: { issue })Used for changes related to jira attachments in a screen section.
styleguide.colorcreated
updated
deleted
Styleguide (extra: { name, platform })Color (extra: { name, r, g, b, a })Used for changes related to colors in a styleguide.
styleguide.text_stylecreated
updated
deleted
Styleguide (extra: { name, platform })TextStyle (extra: { name })Used for changes related to text styles in a styleguide.
styleguide.componentcreated
version_created
deleted
Styleguide (extra: { name, platform })Component (extra: { name })Used for changes related to components in a styleguide.
styleguide.spacing_tokencreated
updated
deleted
Styleguide (extra: { name, platform })SpacingToken (extra: { name, value })Used for changes related to spacing tokens in a styleguide.
styleguide.memberjoinedStyleguide (extra: { name, platform })User (extra: { username })Used for changes related to members of a styleguide.
styleguide.extensionadded
removed
Styleguide (extra: { name, platform })Extension (extra: { name })Used for changes related to extensions in a styleguide.
styleguide.slack_integrationaddedStyleguide (extra: { name, platform })SlackIntegration (extra: { channel })Used for changes related to slack intgrations in a styleguide.
user.project_membershipinvited
role_updated
removed
-Project (extra: { name, platform })Used for changes related to notified user's membership to projects.
user.styleguide_membershipinvited
role_updated
removed
-Styleguide (extra: { name, platform })Used for changes related to notified user's membership to styleguides.

Type: object

AttributeTypeDescription
idstringThe unique id of the notification
typeNotification TypeType of the notification
is_readbooleanWhether the notification is read or not
actionstringAction that causes the notification
createdintegerThe unix timestamp when the screen was created
updatedintegerThe unix timestamp when the screen was updated
resourceNotification Resource (Optional)-
contextobjectAdditional objects which are related to the main resource object. The content of this object changes depending on the type field (e.g. { project: { ... }, screen: { ... } } for a screen related notification).
actorNotification Actor-

Example

{
  "id": "5fbe387f8c72ef23659fb500",
  "timestamp": 1586852836,
  "type": "project.color",
  "action": "created",
  "is_read": false,
  "resource": {
    "id": "5dbad85a76ea51c1f35b6f69",
    "type": "Color",
    "extra": {
      "name": "baby poop green",
      "r": 143,
      "g": 152,
      "b": 5,
      "a": 1
    }
  },
  "context": {
    "project": {
      "id": "5db81e73e1e36ee19f138c1a",
      "type": "Project",
      "extra": {
        "name": "HAL 9000",
        "platform": "web"
      }
    }
  },
  "actor": {
    "user": {
      "id": "5d9caaecb4a3fa9bc9718686",
      "email": "[email protected]",
      "username": "zozo",
      "emotar": "🍎",
      "avatar": "http://placekitten.com/200/300",
      "last_seen": 1616739240
    }
  }
}