# Creating a link to start a new topic with pre-filled information

**URL:** https://meta.discourse.org/t/creating-a-link-to-start-a-new-topic-with-pre-filled-information/28074
**Category:** Using Discourse
**Tags:** how-to
**Created:** [April 29, 2015, 8:13am UTC](https://meta.discourse.org/t/creating-a-link-to-start-a-new-topic-with-pre-filled-information/28074 "2015-04-29T08:13:45Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Discourse](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/discourse/32/148734_2.png) [@Discourse](https://meta.discourse.org/u/Discourse)
#### Post date: [April 29, 2015, 8:13am UTC](https://meta.discourse.org/t/creating-a-link-to-start-a-new-topic-with-pre-filled-information/28074/1 "2015-04-29T08:13:45Z")

</div>

> 🔖 This documentation explains how to create a link that starts a new topic in Discourse with pre-filled information.
> 
> 🙋 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 information, you append `/new-topic` to your site URL, like so:

```plaintext
https://discourse.example.com/new-topic

```

Clicking on this will open up a blank new topic composer for any logged-in user (if not logged-in, you’ll be prompted to signin/signup before then opening the composer).

### Additional Parameters

While a link to open a blank composer can sometimes be useful, the main strength of this feature is the ability to pre-fill the composer with extra information.

To do this, you can add parameters to the base URL:

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

```

This will open a composer window pre-filled with topic title, body, category and tags.

Breaking down the link / URL to show the available options, we have:

- **Base URL** : `https://discourse.example.com/new-topic`
- The `?` URL operator to add the different options
- **Topic title** : `title=topic%20title`
- The `&`, used each time when including another parameter
- **Body** : `body=topic%20body`
- The **category** and **subcategory** separated by a slash `/` if you want to include them: `category=category/subcategory`
- The **tags** separated by comma(s) `,` if you want to include multiple tags: `tags=email,planned`

Each of the parameters is optional and can be mix and matched depending on your desired end result.

As an alternative to using the category/subcategory name, you can specify a numeric `category_id` instead, like:

```plaintext
https://meta.discourse.org/new-topic?title=topic%20title&category_id=3

```

## Example

You can try this here on Meta:

```plaintext
https://meta.discourse.org/new-topic?title=topic%20title&body=topic%20body&category=support/wordpress&tags=wordpress

```

[https://meta.discourse.org/new-topic?title=topic%20title&body=topic%20body&category=support/wordpress&tags=wordpress](https://meta.discourse.org/new-topic?title=topic%20title&body=topic%20body&category=support/wordpress&tags=wordpress)

> ❗ Though please don’t actually create the topic 🙂 For a more hands-on explore of the feature use our demo site, [try.discourse.org](http://try.discourse.org)

## Using Browser DevTools

Open the browser console (F12 → Console) and use the built-in `URLSearchParams` to build the URL — it handles all percent-encoding automatically:

```plaintext
const base = 'https://discourse.example.com/new-topic';
const url = base + '?' + new URLSearchParams({
  title: 'My topic title',
  body: `Body text here...
supports multi line`,
  category: 'support',
  tags: 'bug,urgent'
});
console.log(url); // copy this url

```

## Using a pre-filled URL with Featured Links

This feature also supports [Featured Links](https://meta.discourse.org/t/start-a-topic-by-pasting-a-link-like-reddit/54071), provided that the body parameter is not also included.

> ℹ The URL must be URL encoded for the link to work.

For example, to create a topic with the following URL `https://www.xkcd.com/556`, the link will be:

```plaintext
https://meta.discourse.org/new-topic?title=https%3A%2F%2Fwww.xkcd.com%2F556

```

## Best Practices

- w3Schools [HTML URL Encoding Reference](https://www.w3schools.com/tags/ref_urlencode.ASP) is a good resource to find what text characters are encoded as in the URL. If you have a lot of text to add, there is also a text-to-URL converter in the ‘Try It Yourself’ section.
- Always URL encode the parameters to avoid issues with special characters.
- If you’re unsure about the category ID, you can check it by looking at the number in the category URL. (eg. [https://meta.discourse.org/c/documentation/using-discourse/126](https://meta.discourse.org/c/documentation/using-discourse/126))
- Test the pre-filled links to ensure they work as expected.

> ℹ It is not currently possible to have a pre-filled link that opens a composer to reply to a specific topic.

## Additional Resources

- [Creating pre-filled personal message links](https://meta.discourse.org/t/compose-a-new-pre-filled-personal-message-via-url/35984)

> Last edited by @sam 2026-03-18T04:18:54Z
> 
> > **Check document**
> >
> > Perform check on document:

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [September 10, 2024, 7:48pm UTC](https://meta.discourse.org/t/creating-a-link-to-start-a-new-topic-with-pre-filled-information/28074/52 "2024-09-10T19:48:05Z")

</div>

There is a LOT of technical heavy lifting happening here that makes this a little unacceptable to mortals; I bet we could make a “helper” webpage that allowed people to generate these links easily.

The equivalent of this might be a nifty little project for someone to implement:

```python
import urllib

site = 'meta.discourse.org'
title = '''My special checklist'''
category = 'todo'
tags = ['tag1', 'tag2']

template = '''\
# Important!

Do these things:

[] thing one
[] thing two
'''

query = urllib.parse.urlencode(dict(
    title = title,
    category = category,
    tags = ','.join(tags),
    body = template,
))
print(f'https://{site}/new-topic?{query}')

```

prints [this link](https://meta.discourse.org/new-topic?title=My+special+checklist&category=todo&tags=tag1%2Ctag2&body=%23+Important%21%0A%0ADo+these+things%3A%0A%0A%5B+%5D+thing+one%0A%5B+%5D+thing+two%0A)

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [October 16, 2024, 10:48am UTC](https://meta.discourse.org/t/creating-a-link-to-start-a-new-topic-with-pre-filled-information/28074/55 "2024-10-16T10:48:06Z")

</div>

Thanks for the idea! It inspired me to create [Prefilled composer link generator](https://meta.discourse.org/t/prefilled-composer-link-generator/326460)

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [October 16, 2024, 4:40pm UTC](https://meta.discourse.org/t/creating-a-link-to-start-a-new-topic-with-pre-filled-information/28074/56 "2024-10-16T16:40:30Z")

</div>

Oh! That’s a great implementation idea. Good work!

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [March 18, 2026, 4:20am UTC](https://meta.discourse.org/t/creating-a-link-to-start-a-new-topic-with-pre-filled-information/28074/57 "2026-03-18T04:20:35Z")

</div>

6 posts were split to a new topic: [Support creating pre-filled topic links](https://meta.discourse.org/t/support-creating-pre-filled-topic-links/398695)
