Notifications

This resource represents a notification that is received by an internal or a client user.

Note that List Notifications is available for all workspaces. Create Notification, Delete Notification, and Mark as Notification as Read/Unread are actions only available for Custom Apps.

Properties

idstring
The unique identifier for this item.

createdAtstring
The date this item was created in RFC3339 format.

objectstring
The object type of this resource.

senderIdstring
The ID of the entity sending the notification. This can be an internal user / client user or a company. The type of the id is represented by senderType.

senderTypeclient / internalUser / company
The type of entity the senderId refers to.

recipientIdstring
Deprecated in favor of recipientClientId, recipientCompanyId, and recipientInternalUserId.

recipientClientIdstring
The ID of the client that this notification is intended for. This will be empty if the recipient is not a client.

recipientCompanyIdstring
The ID of the company that this notification is intended for. This is paired with recipientClientId and represents which of the client's companies this notification is associated with.

recipientInternalUserIdstring
The ID of the internal user that this notification is intended for. This will be empty if the recipient is not an internal user.

eventstring
This represents the event the notification was issued for. Below is the set of events and the possible recipients.

Event Recipient/s
files.created Internal users
invoice.paid Internal users
formResponse.completed Internal users
contract.signed Internal users
customApp.action Internal users
invoice.requested Clients
formResponse.requested Clients
contract.requested Clients

appIdstring (optional)
This is populated when the notification is created via a custom app. This contains the appId of the custom app that was used to create the notification.

resourceIdstring
Contains the id of the resource associated with the notification. This refers to different entities based on the notification event:

Notification Resource ID
invoice.paid invoice.id
formResponse.<requested|completed> form.id
contract.<requested|signed> contract.id

deliveryTargetsobject
This will have the following keys:

◦ title string
Label used in the notification title in the web app

◦ body string
Used for custom app notifications. This contains the details of the notifications showed in the notifications page

◦ isRead string
Indicates if the notification has been read

◦ ctaParams object
Key/value pairs that will be included in the search parameters when clicking on the notification’s call to action in product. This call to action is shown in the Notification Center for internal users.

◦ body string
Body of the email sent

◦ subject string
Subject of the email sent

◦ header string
Header in the email body sent

◦ title string
CTA title shown in the email

◦ ctaParams object
Key/value pairs that will be included in the search parameters when clicking on an email notification’s call to action.

Example Client Notification Object

{
  "appId": "5b58089c-1e81-439c-b511-01e3e599c23d",
  "createdAt": "2024-02-22T18:17:01.577287641+05:30",
  "deliveryTargets": {
    "inProduct": {
      "title": "Task was completed",
      "body": "John Doe completed the Upload Logo task.",
      "isRead": false,
      "ctaParams": { "foo": "bar" }
    },
     "email": {
       "subject": "1 task was completed",
       "header": "A task was completed by John Doe",
       "body": "John Doe completed the Upload Logo task.",
       "title": "View Task",
       "ctaParams": { "foo": "bar" }
     }
  },
  "event": "customApp.action",
  "id": "bb9405f0-8644-4bb8-bbc8-84a1a05dcc01",
  "object": "notification",
  "recipientId": "5d686cec-6ef8-4394-a62c-0c2fde950669",
  "recipientClientId": "5d686cec-6ef8-4394-a62c-0c2fde950669",
  "recipientCompanyId": "d15b1422-2e57-42f3-a0ac-0a726d6e1b42",
  "resourceId": "3a5981d8-6619-4dc6-b9b9-a791d275bd5c",
  "senderId": "33da2a16-f525-4d4b-99c8-a273f6260f43",
  "senderType": "client"
}

Example Internal User Notification Object

{
  "appId": "5b58089c-1e81-439c-b511-01e3e599c23d",
  "createdAt": "2024-02-22T18:17:01.577287641+05:30",
  "deliveryTargets": {
    "inProduct": {
      "title": "Task was completed",
      "body": "John Doe completed the Upload Logo task.",
      "isRead": false,
      "ctaParams": { "foo": "bar" }
    },
     "email": {
       "subject": "1 task was completed",
       "header": "A task was completed by John Doe",
       "body": "John Doe completed the Upload Logo task.",
       "title": "View Task",
       "ctaParams": { "foo": "bar" }
     }
  },
  "event": "customApp.action",
  "id": "bb9405f0-8644-4bb8-bbc8-84a1a05dcc01",
  "object": "notification",
  "recipientId": "5d686cec-6ef8-4394-a62c-0c2fde950669",
  "recipientInternalUserId": "5d686cec-6ef8-4394-a62c-0c2fde950669",
  "resourceId": "3a5981d8-6619-4dc6-b9b9-a791d275bd5c",
  "senderId": "33da2a16-f525-4d4b-99c8-a273f6260f43",
  "senderType": "client"
}