Using api to delete records does not trigger webhook

I am using webhook to fire notification, and it work well with other Kintone REST API, except Delete Records api. Webhook only trigger when i use the delete button in records table. Anyone has same problem?

Hi Dang,

“Delete records” can be configured in the Webhook settings.

 

Setting Webhook:

https://get.kintone.help/k/en/user/app_settings/set_webhook/webhook.html

 

However, it also states that “Processing records with REST APIs that are used to take actions on multiple records in bulk” in the caution column.

 

When deleting a record using the REST API, even deleting a single record, it requires to use the following API, which corresponds to manipulating multiple records at once.

 

Delete Records:

https://developer.kintone.io/hc/en-us/articles/212494558-Delete-Records

 

Therefore, even if you are deleting a single record using the REST API, it will not trigger the Webhook notification.

 

I hope this helps.

Hi Sean

So there is no way to trigger webhook when delete record by REST API, right?

Hi Dang, 

 

No, Webhooks notification will not be triggered by the API for bulk deletion of records.

Sean is correct in stating that the Delete Records API will not cause webhooks to be fired as it’s a bulk action.

Is your objective to let your endpoint server know when a record is deleted? (if you could share your scenario, that would be great!)
The only workaround I can think of for now is to call the Update Record API just before the Delete Records API, and update a flag inside the record to tell it that it will be deleted. That should fire a webhook to your endpoint telling it that a record is planned to be deleted.