# Creating pre-filled personal message links

**URL:** https://meta.discourse.org/t/creating-pre-filled-personal-message-links/35984
**Category:** Using Discourse
**Tags:** how-to
**Created:** [November 24, 2015, 1:59pm UTC](https://meta.discourse.org/t/creating-pre-filled-personal-message-links/35984 "2015-11-24T13:59:28Z")
**Posts on this page:** 7
**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: [November 24, 2015, 1:59pm UTC](https://meta.discourse.org/t/creating-pre-filled-personal-message-links/35984/1 "2015-11-24T13:59:28Z")

</div>

> 🔖 This guide describes how to create a link to start a new personal message with pre-filled information, including best practices.
> 
> 🙋 Required user level: All users

Discourse allows you to compose a new personal message with pre-filled information via URL parameters. This can save time and ensure consistency for common messages.

## Structure of the URL

To create a new pre-filled message, format your URL like this:

```plaintext
https://discourse.example.com/new-message?username=techapj&title=message%20title&body=message%20body

```

When broken down, the URL parameters include:

- **Base URL** : `https://discourse.example.com/new-message`
- **Username** : `username=techapj`
- **Title** : `title=message%20title`
- **Body** : `body=message%20body`
- The `?` URL operator to add the different options

You can try this on `try.discourse.org`:

```plaintext
https://try.discourse.org/new-message?username=rudy&title=message%20title&body=message%20body

```

You can also compose a pre-filled message for a **group** via URL:

```plaintext
https://meta.discourse.org/new-message?groupname=team&title=topic%20title&body=topic%20body

```

Notice the **groupname** param in above URL, this means that you want to create a new pre-filled message for a group (as opposed to `username` for composing a message for user). You can also use **group\_name** as an alternative to **groupname**.

## Tags

You can pre-fill tags on a personal message by adding the `tags` parameter:

```plaintext
https://discourse.example.com/new-message?username=techapj&title=Bug%20Report&body=Details&tags=tag1,tag2

```

❗ This requires the `pm_tags_allowed_for_groups` site setting to include the groups that the user belongs to. If PM tagging is not enabled for the user, the tags parameter will be silently ignored.

## Best practices

- You can send message to multiple users by comma separating the usernames. For example

- You don’t need to fill in all of the params. For example any of these would work:

- You can add line spaces using the %0A and %0A%0D codes to give some structure to the body of the message:

- If you have [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true) (SSO), you can link to `example.com/session/sso` and then set the return path to create the personal message. If the user is already logged in they will be redirected automatically to the url supplied by the return path. If they aren’t logged in they will be taken to the [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true) login page and then redirected to the return path url. The return path will need to be url encoded.

## Currently not supported

- Use the pre-filled URL to compose a message to multiple groups.
- Use the pre-filled URL to open the composer in a user’s summary page.
- Using email instead of the username to pre-fill a personal message.

## Additional resources

- [Compose a new pre-filled topic via URL](https://meta.discourse.org/t/compose-a-new-pre-filled-topic-via-url/28074)

> Last edited by @hugh 2025-07-23T20:13:10Z
> 
> > **Check document**
> >
> > Perform check on document:

---

<div class="post-metadata">

### Author: ![putty](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/putty/32/370902_2.png) [@putty](https://meta.discourse.org/u/putty)
#### Post date: [June 18, 2024, 2:01pm UTC](https://meta.discourse.org/t/creating-pre-filled-personal-message-links/35984/55 "2024-06-18T14:01:16Z")

</div>

Can tags be assigned with this as well? I tried mimicking the tag implementation from here but didn’t have any luck.

> [@Creating a link to start a new topic with pre-filled information](https://meta.discourse.org/t/create-a-link-to-start-a-new-topic-with-pre-filled-information/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…

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [June 18, 2024, 3:50pm UTC](https://meta.discourse.org/t/creating-pre-filled-personal-message-links/35984/56 "2024-06-18T15:50:51Z")

</div>

I’m pretty sure it’s the same code. What URL did you try? You can replace the hostname with `meta.discourse.org` if you need to (just don’t actually create the topic!)

Are you sure that you used something like `tags=email,planned` and that the tags exist and can be applied by the user that was trying to use the link?

---

<div class="post-metadata">

### Author: ![putty](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/putty/32/370902_2.png) [@putty](https://meta.discourse.org/u/putty)
#### Post date: [June 18, 2024, 7:15pm UTC](https://meta.discourse.org/t/creating-pre-filled-personal-message-links/35984/57 "2024-06-18T19:15:36Z")

</div>

Here is the URL that I was using:

`https://developer.sailpoint.com/discuss/new-message?groupname=community_managers&title=Livestream%20Presentation%20Submission&tags=livestream&body=I%20would%20like%20to%20present%20a%20livestream%21%20Here%20is%20an%20overview%20of%20my%20presentation%3A%0A%0ATopic%3A%20%5B%5Binsert%20topic%20here%5D%5D%0ADescription%3A%20%5B%5Binsert%20description%20here%5D%5D`

You raise a valid point about permissions with tags, though. Is the PM able to be created with the tag hidden?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [June 18, 2024, 7:19pm UTC](https://meta.discourse.org/t/creating-pre-filled-personal-message-links/35984/58 "2024-06-18T19:19:00Z")

</div>

> [@putty](#):
>
> Is the PM able to be created with the tag hidden?

Can the user create the PM with the desired tags normally via the UX? (Hint: Not the way you have it configured.) The URL is just a way to seed what the user might do in the UX. It doesn’t have magic powers.

There is a site setting that enables tags for PMs. No, a user cannot create a tag that they do not have rights to see.

---

<div class="post-metadata">

### Author: ![putty](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/putty/32/370902_2.png) [@putty](https://meta.discourse.org/u/putty)
#### Post date: [June 20, 2024, 2:51pm UTC](https://meta.discourse.org/t/creating-pre-filled-personal-message-links/35984/59 "2024-06-20T14:51:27Z")

</div>

I confirmed that:

- Tags are accessible for everyone:  

- I also impersonated someone and was able to select the tag in a new PM

☹

---

<div class="post-metadata">

### Author: ![jrgong](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jrgong](https://meta.discourse.org/u/jrgong)
#### Post date: [April 28, 2025, 2:03pm UTC](https://meta.discourse.org/t/creating-pre-filled-personal-message-links/35984/60 "2025-04-28T14:03:34Z")

</div>

Is it somehow possible to include (in the PM body) the current URL the user is on? We would like to add some PM links in our topics for a closed group of users so that they can message our staff referencing a specific topic
