# Check whether a category name is available. API dry-run / custom slug?

**URL:** <https://meta.discourse.org/t/check-whether-a-category-name-is-available-api-dry-run-custom-slug/90373>\
**Category:** Feature\
**Created:** [June 21, 2018, 7:46am 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:** 9

<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:** [June 25, 2018, 9:05am UTC](https://meta.discourse.org/t/check-whether-a-category-name-is-available-api-dry-run-custom-slug/90373/9 "2018-06-25T09:05:44Z")

</div>

I’d have the same problem with trying to fetch `/c/{slug}.json`. I can’t reliably predict what slug will be produced from a given name, other than running it through the Discourse `Slug` module, which is only possible by creating a category and check the output. But then, side-effect. That’s why I’m looking for a side-effect-free way to check the availability of a category name/slug.

Otherwise, I see that I can in fact choose a slug when creating a category but it’s not documented, and the check wether a category name is available or not is done on the name **and** the slug. Is there a good reason to do so? In my case, most of the categories would be hidden and only accessible from direct link, so it’s not a big deal if multiple categories have the same name (but different slugs).

---

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