# Create new topic via URL and set tag or category

**URL:** <https://meta.discourse.org/t/create-new-topic-via-url-and-set-tag-or-category/75169>\
**Category:** Support\
**Created:** [01.Декабрь.2017 14:39:42 UTC](https://meta.discourse.org/t/create-new-topic-via-url-and-set-tag-or-category/75169 "2017-12-01T14:39:42Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![aborruso](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aborruso/32/120505_2.png) [@aborruso](https://meta.discourse.org/u/aborruso)\
**Post date:** [01.Декабрь.2017 14:39:42 UTC](https://meta.discourse.org/t/create-new-topic-via-url-and-set-tag-or-category/75169/1 "2017-12-01T14:39:42Z")

</div>

Hi,  
I’m trying to use a simple html `<a>` to open a URL like

```
http://mysite.com/new-topic?title=topic%20title&body=topic%20body&category=actions

```

It works for title and body, but I’m not able to set the category via URL. Is it possible?  
And is it possible to set a tag?

I need to do it via a simple click.

Thank you

 ![immagine](https://global.discourse-cdn.com/meta/original/3X/4/f/4f22e0697fc3aedd86996648ce09cfabe7ab206b.png)

---

<div class="post-metadata">

**Author:** ![mikechristopher](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mikechristopher/32/89135_2.png) [@mikechristopher](https://meta.discourse.org/u/mikechristopher)\
**Post date:** [01.Декабрь.2017 15:37:33 UTC](https://meta.discourse.org/t/create-new-topic-via-url-and-set-tag-or-category/75169/2 "2017-12-01T15:37:33Z")

</div>

It should work ok as per here:

> [@Creating a link to start a new topic with pre-filled information](https://meta.discourse.org/t/compose-a-new-pre-filled-topic-via-url/28074):
>
> bookmark This documentation explains how to create a link that starts a new topic in Discourse with pre-filled information. person_raising_hand Required user level: All users Sometimes you may want to provide users with a link that opens a new topic composer with certain information pre-filled. This can be useful for various use cases including bug report templates, feature requests, or standardized posts. Constructing the URL Base URL To compose a new pre-filled topic with no extra i…

`https://url.com/new-topic?title=topic%20title&body=topic%20body&category=category/subcategory&tags=email,planned`

For example:  
`https://meta.discourse.org/new-topic?title=topic%20title&body=topic%20body&category=support&tags=email,planned`

---

<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:** [01.Декабрь.2017 23:14:00 UTC](https://meta.discourse.org/t/create-new-topic-via-url-and-set-tag-or-category/75169/3 "2017-12-01T23:14:00Z")

</div>

If it’s not working @techAPJ can follow up; it should be working!

---

<div class="post-metadata">

**Author:** ![aborruso](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aborruso/32/120505_2.png) [@aborruso](https://meta.discourse.org/u/aborruso)\
**Post date:** [02.Декабрь.2017 08:29:03 UTC](https://meta.discourse.org/t/create-new-topic-via-url-and-set-tag-or-category/75169/4 "2017-12-02T08:29:03Z")

</div>

It works great!!

It was my error: I was writing the category `slug` and not the category `name`.

Thank you

---

<div class="post-metadata">

**Author:** ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)\
**Post date:** [05.Декабрь.2017 02:56:56 UTC](https://meta.discourse.org/t/create-new-topic-via-url-and-set-tag-or-category/75169/5 "2017-12-05T02:56:56Z")

</div>

This has come up before @techAPJ. Bit me personally back in the day. Any reason why we only support `name` and not `slug`?

---

<div class="post-metadata">

**Author:** ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)\
**Post date:** [06.Декабрь.2017 08:49:49 UTC](https://meta.discourse.org/t/create-new-topic-via-url-and-set-tag-or-category/75169/6 "2017-12-06T08:49:49Z")

</div>

> [@jomaxro](#):
>
> Any reason why we only support name and not slug?

Not sure actually. Might be because slug sounds technical.

It can either support name or slug. Should we deprecate name in favour of slug?

---

<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:** [06.Декабрь.2017 09:56:59 UTC](https://meta.discourse.org/t/create-new-topic-via-url-and-set-tag-or-category/75169/7 "2017-12-06T09:56:59Z")

</div>

They are different things. Name does not equal slug.

Name would be

> Games and Fun

slug would be

> games-and-fun

---

<div class="post-metadata">

**Author:** ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)\
**Post date:** [06.Декабрь.2017 11:26:18 UTC](https://meta.discourse.org/t/create-new-topic-via-url-and-set-tag-or-category/75169/8 "2017-12-06T11:26:18Z")

</div>

> [@codinghorror](#):
>
> Name does not equal slug.

I understand. By “slug sounds technical” what I meant was not everybody would understand the difference between name and slug. That’s why I added support for name instead of slug.

---

<div class="post-metadata">

**Author:** ![hellekin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hellekin/32/51636_2.png) [@hellekin](https://meta.discourse.org/u/hellekin)\
**Post date:** [06.Декабрь.2017 12:33:51 UTC](https://meta.discourse.org/t/create-new-topic-via-url-and-set-tag-or-category/75169/9 "2017-12-06T12:33:51Z")

</div>

Moreover, name could be `Quick: Unreliable Information Causes Knowledge` and slug could be `quick`. So it’s not as easy at it sounds to deprecate name in favor of slug…

---

<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:** [06.Декабрь.2017 21:34:00 UTC](https://meta.discourse.org/t/create-new-topic-via-url-and-set-tag-or-category/75169/10 "2017-12-06T21:34:00Z")

</div>

I do think site owners who are familiar with how the web works should understand the word “slug”, so it is not that technical IMO.

---

<div class="post-metadata">

**Author:** ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)\
**Post date:** [10.Октябрь.2018 12:20:47 UTC](https://meta.discourse.org/t/create-new-topic-via-url-and-set-tag-or-category/75169/11 "2018-10-10T12:20:47Z")

</div>

> [@jomaxro](#):
>
> Any reason why we only support `name` and not `slug` ?

Not anymore 🙂

[https://github.com/discourse/discourse/commit/c84415b1f2af48478f3356511ce67ba8710f76a5](https://github.com/discourse/discourse/commit/c84415b1f2af48478f3356511ce67ba8710f76a5)

---

<div class="post-metadata">

**Author:** ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Post date:** [08.Июнь.2024 12:37:12 UTC](https://meta.discourse.org/t/create-new-topic-via-url-and-set-tag-or-category/75169/13 "2024-06-08T12:37:12Z")

</div>

Эта тема была автоматически закрыта через 2380 дней. Новые ответы больше не принимаются.
