# Unlist "About the \*\*\*\*\*" topics automatically when it gets created

**URL:** <https://meta.discourse.org/t/unlist-about-the-topics-automatically-when-it-gets-created/171980>\
**Category:** Development\
**Tags:** rest-api, unlisting\
**Created:** [December 2, 2020, 11:06am UTC](https://meta.discourse.org/t/unlist-about-the-topics-automatically-when-it-gets-created/171980 "2020-12-02T11:06:04Z")\
**Posts on this page:** 8\
**Page:** 1

## AI-generated summary

In a discussion about automatically unlisting "About the ***" topics created when a new category is made via API, [Ravi_Teja_Varma](/t/-/171980/1) sought a way to hide these topics from users. [pfaffman](/t/-/171980/2) suggested using the API to unlist the topic after creation, noting that the topic ID should be available in the category response. [Ravi_Teja_Varma](/t/-/171980/3) initially didn’t find the topic ID in the API response, sharing a sample output. [pfaffman](/t/-/171980/6) pointed out that the topic ID is embedded in the `topic_url` field (e.g., `/t/about-the-free-test-api-1-auto-category/82133` — the number 82133 is the topic ID). [Ravi_Teja_Varma](/t/-/171980/7) confirmed this solution worked. The key takeaway is that while the topic ID isn’t directly named in the category object, it can be extracted from the `topic_url` to perform API actions like unlisting.

<div class="post-metadata">

**Author:** ![Ravi\_Teja\_Varma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ravi_teja_varma/32/195200_2.png) [@Ravi\_Teja\_Varma](https://meta.discourse.org/u/Ravi_Teja_Varma)\
**Post date:** [December 2, 2020, 11:06am UTC](https://meta.discourse.org/t/unlist-about-the-topics-automatically-when-it-gets-created/171980/1 "2020-12-02T11:06:04Z")

</div>

I create topics and categories through API. When I create a category, “about the \*\*\*” topic is created automatically but I want to “unlist” it so user should not be able to see it. any suggestions on how I can do this ??

---

<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:** [December 2, 2020, 12:54pm UTC](https://meta.discourse.org/t/unlist-about-the-topics-automatically-when-it-gets-created/171980/2 "2020-12-02T12:54:37Z")

</div>

> [@Ravi\_Teja\_Varma](#):
>
> I want to “unlist” it so user should not be able to see it. any suggestions on how I can do this ?

Use the API. You’d get the topic ID from when you create the topic and then unlist it. See [How to reverse engineer the Discourse API](https://meta.discourse.org/t/how-to-reverse-engineer-the-discourse-api/20576) to see how to unlist it.

---

<div class="post-metadata">

**Author:** ![Ravi\_Teja\_Varma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ravi_teja_varma/32/195200_2.png) [@Ravi\_Teja\_Varma](https://meta.discourse.org/u/Ravi_Teja_Varma)\
**Post date:** [December 3, 2020, 9:37am UTC](https://meta.discourse.org/t/unlist-about-the-topics-automatically-when-it-gets-created/171980/3 "2020-12-03T09:37:26Z")

</div>

I don’t have the topic ID as it is automatically created by discourse when I create a category.

---

<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:** [December 3, 2020, 10:44am UTC](https://meta.discourse.org/t/unlist-about-the-topics-automatically-when-it-gets-created/171980/4 "2020-12-03T10:44:15Z")

</div>

I believe they the topic id of the about topic is in the category record that gets returned when you create the category.

---

<div class="post-metadata">

**Author:** ![Ravi\_Teja\_Varma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ravi_teja_varma/32/195200_2.png) [@Ravi\_Teja\_Varma](https://meta.discourse.org/u/Ravi_Teja_Varma)\
**Post date:** [December 3, 2020, 4:48pm UTC](https://meta.discourse.org/t/unlist-about-the-topics-automatically-when-it-gets-created/171980/5 "2020-12-03T16:48:17Z")

</div>

This is a sample response and I did not find any “topic\_id”, can you help me here @pfaffman

```json
    {
    "category": {
        "id": 68,
        "name": "FREE TEST API 1 AUTO",
        "color": "0088CC",
        "text_color": "FFFFFF",
        "slug": "free-test-api-1-auto",
        "topic_count": 0,
        "post_count": 0,
        "position": 67,
        "description": null,
        "description_text": null,
        "description_excerpt": null,
        "topic_url": "/t/about-the-free-test-api-1-auto-category/82133",
        "read_restricted": false,
        "permission": null,
        "notification_level": 1,
        "can_edit": true,
        "topic_template": null,
        "has_children": null,
        "sort_order": null,
        "sort_ascending": null,
        "show_subcategory_list": false,
        "num_featured_topics": 3,
        "default_view": null,
        "subcategory_list_style": "rows_with_featured_topics",
        "default_top_period": "all",
        "default_list_filter": "all",
        "minimum_required_tags": 0,
        "navigate_to_first_post_after_read": false,
        "custom_fields": {},
        "min_tags_from_required_group": 1,
        "required_tag_group_name": null,
        "read_only_banner": null,
        "available_groups": [
            "admins"
        ],
        "auto_close_hours": null,
        "auto_close_based_on_last_post": false,
        "group_permissions": [
            {
                "permission_type": 1,
                "group_name": "everyone"
            }
        ],
        "email_in": null,
        "email_in_allow_strangers": false,
        "mailinglist_mirror": false,
        "all_topics_wiki": false,
        "can_delete": true,
        "cannot_delete_reason": null,
        "allow_badges": true,
        "topic_featured_link_allowed": true,
        "search_priority": 0,
        "uploaded_logo": null,
        "uploaded_background": null
    }
}

```

---

<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:** [December 3, 2020, 5:28pm UTC](https://meta.discourse.org/t/unlist-about-the-topics-automatically-when-it-gets-created/171980/6 "2020-12-03T17:28:23Z")

</div>

I think this is what you’re looking for:

> [@Ravi\_Teja\_Varma](#):
>
> “topic\_url”: “/t/about-the-free-test-api-1-auto-category/82133”,

---

<div class="post-metadata">

**Author:** ![Ravi\_Teja\_Varma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ravi_teja_varma/32/195200_2.png) [@Ravi\_Teja\_Varma](https://meta.discourse.org/u/Ravi_Teja_Varma)\
**Post date:** [December 4, 2020, 12:00pm UTC](https://meta.discourse.org/t/unlist-about-the-topics-automatically-when-it-gets-created/171980/7 "2020-12-04T12:00:44Z")

</div>

Thanks, it worked @pfaffman

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [January 3, 2021, 12:00pm UTC](https://meta.discourse.org/t/unlist-about-the-topics-automatically-when-it-gets-created/171980/8 "2021-01-03T12:00:46Z")

</div>

Closed on January 3, 2021, 12:00pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
