# Using api to delete records does not trigger webhook

**URL:** https://forum.kintone.dev/t/using-api-to-delete-records-does-not-trigger-webhook/340
**Category:** General
**Created:** [September 1, 2020, 8:31am UTC](https://forum.kintone.dev/t/using-api-to-delete-records-does-not-trigger-webhook/340 "2020-09-01T08:31:43Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)
#### Post date: [September 1, 2020, 8:31am UTC](https://forum.kintone.dev/t/using-api-to-delete-records-does-not-trigger-webhook/340/1 "2020-09-01T08:31:43Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)
#### Post date: [September 2, 2020, 3:18pm UTC](https://forum.kintone.dev/t/using-api-to-delete-records-does-not-trigger-webhook/340/2 "2020-09-02T15:18:46Z")

</div>

Hi Dang,

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

&nbsp;

Setting Webhook:

[https://get.kintone.help/k/en/user/app\_settings/set\_webhook/webhook.html](https://get.kintone.help/k/en/user/app_settings/set_webhook/webhook.html)

&nbsp;

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.

&nbsp;

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.

&nbsp;

Delete Records:

[https://developer.kintone.io/hc/en-us/articles/212494558-Delete-Records](https://forum.kintone.dev/hc/en-us/articles/212494558-Delete-Records)

&nbsp;

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

&nbsp;

I hope this helps.

---

<div class="post-metadata">

### Author: ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)
#### Post date: [September 3, 2020, 4:25am UTC](https://forum.kintone.dev/t/using-api-to-delete-records-does-not-trigger-webhook/340/3 "2020-09-03T04:25:53Z")

</div>

Hi Sean

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

---

<div class="post-metadata">

### Author: ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)
#### Post date: [September 3, 2020, 2:20pm UTC](https://forum.kintone.dev/t/using-api-to-delete-records-does-not-trigger-webhook/340/4 "2020-09-03T14:20:00Z")

</div>

Hi Dang,&nbsp;

&nbsp;

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

---

<div class="post-metadata">

### Author: ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)
#### Post date: [September 8, 2020, 1:35am UTC](https://forum.kintone.dev/t/using-api-to-delete-records-does-not-trigger-webhook/340/5 "2020-09-08T01:35:10Z")

</div>

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](http://developer.kintone.io/hc/en-us/articles/213149027)&nbsp;just before the [Delete Records API](http://developer.kintone.io/hc/en-us/articles/212494558), 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.
