# API - How to revoke badge from a user

**URL:** <https://meta.discourse.org/t/api-how-to-revoke-badge-from-a-user/45560>\
**Category:** Product Support\
**Created:** [11.Июнь.2016 07:13:24 UTC](https://meta.discourse.org/t/api-how-to-revoke-badge-from-a-user/45560 "2016-06-11T07:13:24Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)\
**Post date:** [11.Июнь.2016 11:06:57 UTC](https://meta.discourse.org/t/api-how-to-revoke-badge-from-a-user/45560/2 "2016-06-11T11:06:57Z")

</div>

This took a moment to research, but it’s not that hard actually:

- `GET` to `/user-badges/<username>.json`
- In the result, inspect `user_badges` and find the entry you want to delete. You can identify the badge by its `badge_id`, which will be defined in the `badges` property of the answer.
- Look at the `id` property of the entry you want to delete, and `DELETE` `/user_badges/<id>`.

Interestingly, the response to `/user-badges/<username>.json` also contains a few badges the have not been granted to this user – maybe a :discourse: team member can explain why 🙂

---

_[View the full topic](https://meta.discourse.org/t/api-how-to-revoke-badge-from-a-user/45560)._
