You can create individual channels to 'watch' set of activities performed on certain CRM modules like Leads/Contacts/Accounts etc.
{ "watch": [ { "channel_id": "10000007828", "events": [ "Contacts.create", "Accounts.edit", "Deals.create" ], "channel_expiry": "2020-02-02T10:30:00+05:30", "token": "contacts_and_deals7828", "notify_url": "https://webhook.site/71d9de50-244f-473e-beb6-1acd161c3ac6" } ] } |
Key and Data type | Description |
notify_url (mandatory) String | A valid URL that accepts data from the Notification API. Whenever any action gets triggered, the notification will be sent to this notify URL. |
channel_id (mandatory) String | The unique identification of that particular channel. The given value is sent back in the notification when an action happens in that channel. |
events (mandatory) JSON array | A JSON array of the module API name and the operation type (action on the records) that you want to be notified upon. |
token String, max of 50 characters | The given value is sent back in the notification URL body to ensure that the notification is sent from Zoho CRM. By using this value, users can validate the notifications. |
channel_expiry DateTime | The expiry time of the channel in the ISO8601 format. After this time, notifications for the channel are not sent. The expiry can be a maximum of one day after the notifications were enabled for that channel. If you do not specify this value or set an expiry time beyond one day, the system considers the default expiration time of one hour. |
{ "watch": [ { "code": "SUCCESS", "details": { "events": [ { "channel_expiry": "2020-01-10T19:20:23+05:30", "resource_uri": "{{api-domain}}/crm/v2/Contacts", "resource_id": "3652397000000002179", "resource_name": "Contacts", "channel_id": "10000007828" }, { "channel_expiry": "2020-01-10T19:20:23+05:30", "resource_uri": "{{api-domain}}/crm/v2/Deals", "resource_id": "3652397000000002181", "resource_name": "Deals", "channel_id": "10000007828" }, { "channel_expiry": "2020-01-10T19:20:23+05:30", "resource_uri": "{{api-domain}}/crm/v2/Accounts", "resource_id": "3652397000000002177", "resource_name": "Accounts", "channel_id": "10000007828" } ] }, "message": "Successfully subscribed for actions-watch of the given module", "status": "success" } ] } |
{ "query_params": {}, "module": "Contacts", "resource_uri": "{{api-domain}}/crm/v2/Contacts", "ids": [ "3652397000001565035" ], "operation": "insert", "channel_id": "10000007828", "token": "contacts_deals_accounts_7828" } |
Key and Data Type | Description |
per_page Integer | The number of channels you want to fetch per API call. The maximum is 200. |
page Integer | To get the list of records from the respective pages. The default value is 1. |
module String | The API name of the module to fetch notifications enabled for that module. |
channel_id String | The unique ID of the notification channel. |
{ "watch": [ { "channel_id": "10000007828", "events": [ "Contacts.create", "Contacts.edit", "Deals.create" ], "channel_expiry": "2020-01-12T15:35:05+05:30", "token": "contacts_deals_7828", } ] } |
{ "watch": [ { "events": [ "Contacts.create" ], "_delete_events": true } ] } |
Key and Data Type | Description |
channel_id (mandatory) Integer | The unique ID of the channel that you want to update or delete. |
events (mandatory) JSON array | The module API name (from the module metadata API) and the operation type (all, create, edit, and delete) that you want to disable notifications for. |
_delete_events (mandatory for PATCH) Boolean | Indicates whether you want to delete the events mentioned in the input. true deletes all the notifications for the events; false or not specifying this key in the input does not disable notifications. |
Writer is a powerful online word processor, designed for collaborative work.