# Bulk revert edits (bulk undo edits)

**URL:** https://meta.discourse.org/t/bulk-revert-edits-bulk-undo-edits/106686
**Category:** Support
**Created:** [1월 16, 2019, 11:47오전 UTC](https://meta.discourse.org/t/bulk-revert-edits-bulk-undo-edits/106686 "2019-01-16T11:47:45Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Mohammad\_Etemaddar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mohammad_etemaddar/32/129007_2.png) [@Mohammad\_Etemaddar](https://meta.discourse.org/u/Mohammad_Etemaddar)
#### Post date: [1월 16, 2019, 11:47오전 UTC](https://meta.discourse.org/t/bulk-revert-edits-bulk-undo-edits/106686/1 "2019-01-16T11:47:45Z")

</div>

Hello,  
We have a bot that does editting in the forum. Sometimes it does much bad edits, we would like to revert all of them and debug the bot and then start it again,  
Is it possible to revert bulk edits by such user?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [1월 16, 2019, 12:05오후 UTC](https://meta.discourse.org/t/bulk-revert-edits-bulk-undo-edits/106686/2 "2019-01-16T12:05:51Z")

</div>

What kind of bot is this, and who wrote it? You?

---

<div class="post-metadata">

### Author: ![Mohammad\_Etemaddar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mohammad_etemaddar/32/129007_2.png) [@Mohammad\_Etemaddar](https://meta.discourse.org/u/Mohammad_Etemaddar)
#### Post date: [1월 16, 2019, 12:22오후 UTC](https://meta.discourse.org/t/bulk-revert-edits-bulk-undo-edits/106686/3 "2019-01-16T12:22:16Z")

</div>

Yes, I wrote the bot.  
It’s a bot that does formating edits on posts by API.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [1월 16, 2019, 2:52오후 UTC](https://meta.discourse.org/t/bulk-revert-edits-bulk-undo-edits/106686/4 "2019-01-16T14:52:50Z")

</div>

That sounds like a good feature to add to your bot!

The best way to debug is to take a backup before the bot runs and restore the backup of it misbehaved. Failing that, you’ll need to find a way to select to posts that need reverting and then revert them.

---

<div class="post-metadata">

### Author: ![Mohammad\_Etemaddar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mohammad_etemaddar/32/129007_2.png) [@Mohammad\_Etemaddar](https://meta.discourse.org/u/Mohammad_Etemaddar)
#### Post date: [1월 16, 2019, 2:53오후 UTC](https://meta.discourse.org/t/bulk-revert-edits-bulk-undo-edits/106686/5 "2019-01-16T14:53:56Z")

</div>

Is there any way to revert them by API?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [1월 16, 2019, 3:17오후 UTC](https://meta.discourse.org/t/bulk-revert-edits-bulk-undo-edits/106686/6 "2019-01-16T15:17:17Z")

</div>

Yes! See [Reverse engineer the Discourse API](https://meta.discourse.org/t/how-to-reverse-engineer-the-discourse-api/20576)

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [1월 5, 2022, 10:22오전 UTC](https://meta.discourse.org/t/bulk-revert-edits-bulk-undo-edits/106686/7 "2022-01-05T10:22:45Z")

</div>


