This resource represents a notification that is received by a 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
id string
The unique identifier for this item.
createdAt string
The date this item was created in RFC3339 format.
object string
The object type of this resource.
senderId string
The id
of the entity sending the notification. This can be a internal user / client user or a company. The type of the id is represented by senderType
senderType client / internalUser / company
The type of entity the senderId
refers to.
recipientId string
The id
of the user receiving the notification. This can be a internal user or a client user.
event string
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 |
appId string
(optional)
This is populated when the notification is create via a custom app. This contains the appId
of the custom app that was used to create the notification.
resourceId string
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 |
deliveryTargets object
This will have the following keys:
inProduct
- relevant to the notification delivered in the web app
◦title
string
Label used in the notification title in the webapp
◦body
string
Used for custom app notifications. This contains the details of the notifications showed in the notifications pageemail
- relevant to the notification delivered via email (if applicable)
◦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
{
"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
},
"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"
}
},
"event": "customApp.action",
"id": "bb9405f0-8644-4bb8-bbc8-84a1a05dcc01",
"object": "notification",
"recipientId": "5d686cec-6ef8-4394-a62c-0c2fde950669",
"resourceId": "3a5981d8-6619-4dc6-b9b9-a791d275bd5c",
"senderId": "33da2a16-f525-4d4b-99c8-a273f6260f43",
"senderType": "client"
}