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
Deprecated in favor or recipientClientId, recipientCompanyId, and recipientInternalUserId.
recipientClientId string
The ID of the client that this notification is intended for. This will be empty if the recipient is not a client.
recipientCompanyId string
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.
recipientInternalUserId string
The ID of the internal user that this notification is intended for. This will be empty if the recipient is not an internal 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
◦titlestring Label used in the notification title in the webapp ◦bodystring Used for custom app notifications. This contains the details of the notifications showed in the notifications page ◦isReadstring Indicates if the notification has been read ◦ctaParamsobject 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.email- relevant to the notification delivered via email (if applicable)
◦bodystring Body of the email sent ◦subjectstring Subject of the email sent ◦headerstring Header in the email body sent ◦titlestring CTA title shown in the email ◦ctaParamsobject Key/value pairs that will be included in the search parameters when clicking on an email notification’s call to action.
{
"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"
}{
"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"
}