# Creating badge via API query works, but returns 422

**URL:** <https://meta.discourse.org/t/creating-badge-via-api-query-works-but-returns-422/40127>\
**Category:** Development\
**Created:** [2016 年2 月 24 日 23:03 UTC](https://meta.discourse.org/t/creating-badge-via-api-query-works-but-returns-422/40127 "2016-02-24T23:03:08Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

作者： ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
发布日期： [2018 年11 月 15 日 14:14 UTC](https://meta.discourse.org/t/creating-badge-via-api-query-works-but-returns-422/40127/2 "2018-11-15T14:14:31Z")

</div>

You get this error if you try to create a badge that has a name that already exists.

---

_[View the full topic](https://meta.discourse.org/t/creating-badge-via-api-query-works-but-returns-422/40127)._
