# Comprueba si un nombre de categoría está disponible. ¿API dry-run o slug personalizado?

**URL:** <https://meta.discourse.org/t/check-whether-a-category-name-is-available-api-dry-run-custom-slug/90373>\
**Category:** Feature\
**Created:** [21 Junio, 2018 07:46 UTC](https://meta.discourse.org/t/check-whether-a-category-name-is-available-api-dry-run-custom-slug/90373 "2018-06-21T07:46:59Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![ryancey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ryancey/32/99309_2.png) [@ryancey](https://meta.discourse.org/u/ryancey)\
**Post date:** [22 Junio, 2018 10:07 UTC](https://meta.discourse.org/t/check-whether-a-category-name-is-available-api-dry-run-custom-slug/90373/5 "2018-06-22T10:07:54Z")

</div>

> [@fefrei](#):
>
> You’ll probably always have to handle problems while creating the category. The name already being taken is not the only possible reason for this to fail

Sure, but I’d need to handle the “name already taken” error specifically in terms of UI/UX. Other errors would not be user-related (because the only thing that ties my user to Discourse at this point is a category name) and would be treated as server errors.

> [@fefrei](#):
>
> and the category could be created after you checked whether the name is taken 🙂

Yes, but checking it by issuing a POST request to `categories.json` would automatically create it if available, not only check it 😕

That’s what I meant in:

> [@ryancey](#):
>
> I prefered not to try to create a category to check wether the name is available or not.

---

_[View the full topic](https://meta.discourse.org/t/check-whether-a-category-name-is-available-api-dry-run-custom-slug/90373)._
