Disable Specific Notifications

Purpose

To disable notifications for the specified events in a channel.

Request Details

Request URL

{api-domain}/crm/{version}/actions/watch

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Scope

scope=ZohoCRM.notifications.{operation_type}

Possible operation types

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

Sample Request

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

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

Input JSON Keys

  • _delete_eventsboolean, mandatory

    To specify whether to disable specific notifications.

  • channel_idlong, mandatory

    The given value is sent back in notification URL body to make sure that the notification is for a particular channel.
    Possible values: Channel ID. Example: 1000000068001

  • events JSONArray["{module_api_name}.{operation}", "{module_api_name}.{operation}"], mandatory

    To subscribe based on particular operations on selected modules.
    Possible values: JSON Array of the provided format. Example: ["Leads.create","Sales_Orders.edit","Contacts.delete"]. Possible operation types - create, delete, edit, all

Note
  • _delete_events key is mandatory to disable specific notifications. If "_delete_events": false or _delete_events key is not given in the input, instant notifications will not be disabled.

  • channel_id and events keys are also mandatory.

Sample Input

Copied{
    "watch": [
       {
            "channel_id": "1000000058001",
            "events": [
                "Leads.edit",
                "Cases.all"
            ],
            "_delete_events": true
        }
    ]
}

Sample Response

Copied{
    "watch": [
       {
            "code": "SUCCESS",
            "details": {
                "events": [
                   {
                        "resource_uri": "https://www.zohoapis.com/crm/v3/Leads",
                        "resource_id": "1000000000041",
                        "resource_name": "Leads",
                        "channel_id": "1000000058001"
                    },
                   {
                        "resource_uri": "https://www.zohoapis.com/crm/v3/Cases",
                        "resource_id": "1000000000089",
                        "resource_name": "Cases",
                        "channel_id": "1000000058001"
                    }
                ]
            },
            "message": "Successfully removed the subscribe details",
            "status": "success"
        }
    ]
}

Possible Errors

  • INVALID_DATA HTTP 400

    The user do not have permission to subscribe to the module.
    Resolution: Contact your system administrator

Sample Response

Copied{
    "watch": [
       {
            "code": "SUCCESS",
            "details": {
                "events": [
                   {
                        "resource_uri": "https://www.zohoapis.com/crm/v3/Leads",
                        "resource_id": "1000000000041",
                        "resource_name": "Leads",
                        "channel_id": "1000000058001"
                    },
                   {
                        "resource_uri": "https://www.zohoapis.com/crm/v3/Cases",
                        "resource_id": "1000000000089",
                        "resource_name": "Cases",
                        "channel_id": "1000000058001"
                    }
                ]
            },
            "message": "Successfully removed the subscribe details",
            "status": "success"
        }
    ]
}