Update Specific Information of a Notification

Purpose

To update only specific details of a specific notification enabled by the user. All the provided details would be persisted and rest of the details will not be removed.

Request URL

https://www.zohoapis.com/crm/v2/actions/watch

Request Method

PATCH

Scope

scope=ZohoCRM.notifications.{operation_type}

 
Possible operation types
ALL - Full access to notification data
WRITE - Edit notification details
UPDATE - Update notification details

Input JSON Keys

KeyValuePurpose
tokenString(Maximum length is 50 characters)To ensure that the notification is sent from Zoho CRM, by sending back the given value in notification URL body. By using this value, user can validate the notifications.
notify_urlStringURL to be notified (POST request). Whenever any action gets triggered, the notification will be sent through this notify url.
channel_id
(mandatory)
String(long)The given value is sent back in notification URL body to make sure that the notification is for a particular channel.
channel_expiryString (ISO Date time)To set the expiry time for instant notifications. Maximum of only one day from the time the notifications were enabled. If it is not specified or set for more than a day, the default expiry time is for one hour.
eventsJSONArray
["{module_api_name}.{operation}",
"{module_api_name}.{operation}"]
Ex: ["Leads.create","Sales_Orders.edit","Contacts.delete"]
Possible operation types - create, delete, edit, all
To enable notification based on particular operations on selected modules.

Sample Request

Copiedcurl "https://www.zohoapis.com/crm/v2/actions/watch"
-X PATCH
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
-d "@inputData.json"

In the request, "@inputData.json" contains the sample input data.

Sample Input

Copied{
    "watch": [
       {
            "channel_id": "1000000068001",
            "events": [
                "Solutions.create",
                "Price_Books.delete"
            ],
            "channel_expiry": "2018-02-02T11:30:00+05:30"
        },
       {
            "channel_id": "1000000068002",
            "events": [
                "Deals.edit"
            ],
            "channel_expiry": "2018-02-02T11:30:00+05:30"
        }
    ]
}

Sample Response

Copied{
    "watch": [
       {
            "code": "SUCCESS",
            "details": {
                "events": [
                   {
                        "channel_expiry": "2018-02-02T11:30:00+05:30",
                        "resource_uri": "https://www.zohoapis.com/crm/v2/Solutions",
                        "resource_id": "1000000000091",
                        "resource_name": "Solutions",
                        "channel_id": "1000000068001"
                    },
                   {
                        "channel_expiry": "2018-02-02T11:30:00+05:30",
                        "resource_uri": "https://www.zohoapis.com/crm/v2/Price_Books",
                        "resource_id": "1000000000097",
                        "resource_name": "Price_Books",
                        "channel_id": "1000000068001"
                    }
                ]
            },
            "message": "Successfully updated the subscribe details",
            "status": "success"
        },
       {
            "code": "SUCCESS",
            "details": {
                "events": [
                   {
                        "channel_expiry": "2018-02-02T11:30:00+05:30",
                        "resource_uri": "https://www.zohoapis.com/crm/v2/Deals",
                        "resource_id": "1000000000047",
                        "resource_name": "Deals",
                        "channel_id": "1000000068002"
                    }
                ]
            },
            "message": "Successfully updated the subscribe details",
            "status": "success"
        }
    ]
}