Update notification details

Update user-enabled notification details. The input details will overwrite existing details that are set while enabling a notification. You can update up to 100 channels per API call.

Request URL

{api-domain}/bigin/v2/actions/watch

Choose a domain-specific URL to replace {api-domain}

You can use the domain-specific URL to access Bigin resources. Based on the data center in which the Bigin account's resources are available, replace {api-domain} in the preceding request with one of the following API domain URLs:

  • For US: https://www.zohoapis.com
  • For EU: https://www.zohoapis.eu
  • For AU: https://www.zohoapis.com.au
  • For IN: https://www.zohoapis.in
  • For CN: https://www.zohoapis.com.cn
  • For JP: https://www.zohoapis.jp

For more information, read Multi DC Support.

 

Authorization

For this endpoint, pass the access token as an authorization header. Read OAuth Authentication for more information about access tokens.

Authorization: Zoho-oauthtoken <ACCESS_TOKEN>

You must authenticate using an access token that is associated with the following scope:

  • ZohoBigin.notifications.ALL
  • ZohoBigin.notifications.WRITE
  • ZohoBigin.notifications.UPDATE

Sample request

Copiedcurl "https://www.zohoapis.com/bigin/v2/actions/watch" \
-X PUT \
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf" \
-d "@notif-webhook-update.json"

Request parameters

The available request parameters are provided below:

Body parameters

token stringOptional

This value is sent back in the notification URL body to ensure that the notification is sent from Bigin. Users can use this value for validation, and it's limited to a maximum length of 50 characters.

For example:

"token": "TOKEN_FOR_VERIFICATION_OF_1002"

notify_url stringRequired

A valid URL serves as a webhook to receive event notifications from Bigin. When a specific action is triggered, the notification is sent to this URL.

For example:

"notify_url": "https://www.example.com/callback/"

channel_id stringRequired

This is the unique identifier of a channel that's set while enabling a notification.

channel_expiry datetimeOptional

This is the expiry time of the channel in ISO8601 format. After this time, notifications for the channel will no longer be sent. You can set the expiry time up to one day from the moment notifications are enabled for the channel. If you do not specify this value or set an expiry time beyond one day, the system will use the default expiration time of one hour.

For example:

"channel_expiry": "2023-11-02T10:30:00+05:30"

events jsonarrayOptional

This is a JSON array containing the module API name and operation type (e.g., Contacts.create or Pipelines.edit) for receiving notifications for specific actions within Bigin. This parameter allows you to customize notifications by specifying the module API name and operation type for record actions.

Note:

The specified values in the JSON array will overwrite existing details that are set while enabling a notification.

For example:

"events": [
"Contacts.create",
"Accounts.edit",
"Pipelines.delete",
"Products.all"
]

Sample request body

Copied{
    "watch": [
        {
            "channel_id": "1001",
            "events": [
				"Contacts.edit",
				"Accounts.edit"
			],
            "token": "UPDATED_TOKEN_FOR_VERIFICATION_OF_1001",
            "notify_url": "https://webhook.site/924ad5dc-e982-4525-894a-a1851507b1ae"
		}
	]
}

Sample response

Copied{
    "watch": [
        {
            "code": "SUCCESS",
            "details": {
                "events": [
                    {
                        "channel_expiry": "2023-10-12T14:14:06+05:30",
                        "resource_uri": "https://www.zohoapis.com/bigin/v2/Contacts",
                        "resource_id": "5436046000000002179",
                        "resource_name": "Contacts",
                        "channel_id": "1001"
				},
                    {
                        "channel_expiry": "2023-10-12T14:14:06+05:30",
                        "resource_uri": "https://www.zohoapis.com/bigin/v2/Accounts",
                        "resource_id": "5436046000000002177",
                        "resource_name": "Accounts",
                        "channel_id": "1001"
					}
				]
            },
            "message": "Successfully subscribed for actions-watch of the given module",
            "status": "success"
		}
	]
}

Request body of the notification that Bigin sends to the notify URL

Copied{
    "server_time": 1697093536235,
    "query_params": {},
    "module": "Contacts",
    "resource_uri": "https://www.zohoapis.com/bigin/v2/Contacts",
    "ids": [
		"5436046000000930004"
	],
    "affected_fields": [
        {
            "5436046000000930004": [
				"Department",
				"Mobile",
				"Description"
			]
		}
	],
    "operation": "update",
    "channel_id": "1001",
    "token": "UPDATED_TOKEN_FOR_VERIFICATION_OF_1001"
}