To Update a Webhook
Description
You can use this API to update a Webhook in your portal.
Requested Payload:
- type (Mandatory) - To list the specific type of webhooks, the value of the type can be data and administration.
- events - To specify the list of events that you should to be notified (ex:conversation.created.)
Note: If the event is updated with new set, then it will replace the existing events and will not get added to it.
- url - The Webhook url to which the events will be notified through POST request. While updating the webhook url for a webhook, a HEAD request is made to the webhook url. The webhook should return a success response with HTTP Code 200. Else, an exception will be thrown
- app_ids - To specify the app IDs and to associate the webhook with the particular apps alone (applicable only for Data webhook.)
Note: If the app_ids is updated with new set, then it will replace the existing app_ids and will not get added to it.
- secured - To send a verification signature during the webhook invocation and check if the connection is secure (value: true/false).
- version - The version of the webhook. During the notification or invocation, the webhook payload version will be based on this version.
- expiry_time_for_executions_data - The time period in milliseconds for which the failed executions for the particular webhook is being retained in SalesIQ. Minimum of one week and maximum of 60 days, By default, it is 60 days.
OAuth Scope:
SalesIQ.webhooks.UPDATE
URL:
Copiedhttps://{zohosalesiq_server_uri}/api/v2/{screenname}/webhooks/{id}
Example:
Copiedhttps://salesiq.zoho.com/api/v2/zylker/webhooks/19367000000120011
Payload:
Copied{
"type": "data",
"url": "https://zylker.com/webhooks.ext",
"events": [
"conversation.created",
"conversation.missed",
"conversation.visitor.replied",
"conversation.operator.replied",
"conversation.rated"
],
"secured": true,
"app_ids": [
"19367000000002043"
],
"version": "1",
"expiry_time_for_executions_data" : "180000000"
}
Sample Response
Copied{
"url": "/api/v2/zylker/webhooks/19367000000120011",
"object": "webhook",
"data": {
"modified_time": "1566841793192",
"url": "https://zylker.com/webhooks.ext",
"expiry_time_for_executions_data": "180000000",
"id": "19367000000120011",
"modifier": {
"id": "19367000000002079"
},
"creator": {
"id": "19367000000002079"
},
"status": "enabled",
"failures_count": "0",
"secured": true,
"app_ids": [
"19367000000002043"
],
"version": 1,
"type": "data",
"public_keys": [
{
"key": "",
"creator": {
"id": "19367000000002079"
},
"created_time": "1566676375915",
"id": "1566676375915"
}
],
"created_time": "1566676375741",
"events": [
"conversation.created",
"conversation.missed",
"conversation.visitor.replied",
"conversation.operator.replied",
"conversation.rated"
]
},
"sync_time": "1566888552910"
}