# מהי הכתובת הישירה למנוי התראה "צפייה בפוסט הראשון"?

**URL:** https://meta.discourse.org/t/what-is-the-direct-url-for-watching-first-post-notification-subscription/301799
**Category:** Support
**Created:** [1 באפריל,‏ 2024,‏ 4:35am UTC](https://meta.discourse.org/t/what-is-the-direct-url-for-watching-first-post-notification-subscription/301799 "2024-04-01T04:35:45Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![45thj5ej](https://avatars.discourse-cdn.com/v4/letter/4/34f0e0/32.png) [@45thj5ej](https://meta.discourse.org/u/45thj5ej)
#### Post date: [1 באפריל,‏ 2024,‏ 4:35am UTC](https://meta.discourse.org/t/what-is-the-direct-url-for-watching-first-post-notification-subscription/301799/1 "2024-04-01T04:35:45Z")

</div>

I saw some topics on this, but none I saw had a simple direct URL.

 ![hhhh](https://global.discourse-cdn.com/meta/original/4X/8/0/4/804c9cc0bd9fcd606902ce723928e4eed1f6fac7.png)

Basically, I want a direct URL that subscribes a user to a category when they click it on my site, which then notifies them by e-mail when a new topic is made in that category.

Basically, I have this code below that is a Subscribe button and when clicked, a pop-up box appears with a checkbox. If you check the box and press Subscribe, you get an e-mail when a new blog post is made. The way it works is subscribing to the category, but I am trying to find a way to convert it from the code that it is to just a direct URL. Either way, I need a direct URL for my purposes.

```plaintext
<% if @category_user.present? %>
  <%= render partial: 'modal', locals: {
    title: "Subscribe",
    class: "subscribe",
    content: render(partial: "subscription_form", locals: {
      category_id: @category_user.category.id,
      subscribed: @category_user.notification_level >= CategoryUser.notification_levels[:watching_first_post]
    })
  } %>

```

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [1 באפריל,‏ 2024,‏ 2:32pm UTC](https://meta.discourse.org/t/what-is-the-direct-url-for-watching-first-post-notification-subscription/301799/3 "2024-04-01T14:32:12Z")

</div>

Can you elaborate on what context you would require a direct URL to understand better?

You have this `default categories watching first post` setting if you want to define this behavior by default. (Note: You will be asked whether you want to overwrite the user’s preferences.) Would that help?

![image](https://global.discourse-cdn.com/meta/original/4X/6/e/e/6ee1fb01bdb71a20771fdd01ef0e5c7c772bde94.png)

---

<div class="post-metadata">

### Author: ![45thj5ej](https://avatars.discourse-cdn.com/v4/letter/4/34f0e0/32.png) [@45thj5ej](https://meta.discourse.org/u/45thj5ej)
#### Post date: [1 באפריל,‏ 2024,‏ 2:33pm UTC](https://meta.discourse.org/t/what-is-the-direct-url-for-watching-first-post-notification-subscription/301799/4 "2024-04-01T14:33:22Z")

</div>

Just something specific I’m doing on my forums. That setting won’t help, unfortunately. Just need a direct URL.

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [1 באפריל,‏ 2024,‏ 2:57pm UTC](https://meta.discourse.org/t/what-is-the-direct-url-for-watching-first-post-notification-subscription/301799/5 "2024-04-01T14:57:09Z")

</div>

You could use the API.

Specifically `POST /category/ID_HERE/notifications` route with the payload `notification_level: 4`.

However, the context is unclear. If you could give more specific details about what you’re trying to achieve, we could give you a more precise answer.

---

<div class="post-metadata">

### Author: ![45thj5ej](https://avatars.discourse-cdn.com/v4/letter/4/34f0e0/32.png) [@45thj5ej](https://meta.discourse.org/u/45thj5ej)
#### Post date: [6 באפריל,‏ 2024,‏ 9:21pm UTC](https://meta.discourse.org/t/what-is-the-direct-url-for-watching-first-post-notification-subscription/301799/8 "2024-04-06T21:21:39Z")

</div>

I would like a button, that when clicked/tapped on, it subscribes you to a category basically, and sets it to “Watching First Post/” Not sure how to tie in that above `POST /category/ID_HERE/notifications` API stuff to when a button is pressed.

Basically, I have this code below that is a Subscribe button and when clicked, a pop-up box appears with a checkbox. If you check the box and press Subscribe, you get an e-mail when a new blog post is made. The way it works is subscribing to the category, but I am trying to find a way to convert it from the code that it is to just a direct URL. Either way, I need a direct URL for my purposes.

```plaintext
<% if @category_user.present? %>
  <%= render partial: 'modal', locals: {
    title: "Subscribe",
    class: "subscribe",
    content: render(partial: "subscription_form", locals: {
      category_id: @category_user.category.id,
      subscribed: @category_user.notification_level >= CategoryUser.notification_levels[:watching_first_post]
    })
  } %>

```
