### Get Site Info Source: https://docs.discourse.org/openapi.json Fetches all categories and subcategories of the site. This endpoint is useful for understanding the site's structure. ```APIDOC ## GET /site.json ### Description Can be used to fetch all categories and subcategories ### Method GET ### Endpoint /site.json ### Response #### Success Response (200) - **default_archetype** (string) - The default archetype for the site. - **notification_types** (object) - An object containing different notification types and their integer values. ``` -------------------------------- ### List Users Response Source: https://docs.discourse.org/ Example response structure for listing users, which can include various parameters for filtering and sorting. ```json { "users": [ { "id": 0, "username": "string", "name": "string", "avatar_template": "string", "email": "string", "created_at": "string", "active": true, "admin": true, "moderator": true, "trust_level": 0, "silenced": true, "silenced_till": "string", "suspended": true, "suspended_till": "string" } ], "total_rows_users": 0, "load_more_users_start": null } ``` -------------------------------- ### Get site basic info Source: https://docs.discourse.org/ Fetches basic information about a Discourse site, including logo URLs, titles, and configuration settings. ```APIDOC ## Get site basic info ### Description Can be used to fetch basic info about a site ### Method GET ### Endpoint /site/basic-info.json ### Responses #### Success Response (200) - **logo_url** (string) - **logo_small_url** (string) - **apple_touch_icon_url** (string) - **favicon_url** (string) - **title** (string) - **description** (string) - **header_primary_color** (string) - **header_background_color** (string) - **login_required** (boolean) - **locale** (string) - **include_in_discourse_discover** (boolean) - **mobile_logo_url** (string) ### Response Example ```json { "logo_url": "string", "logo_small_url": "string", "apple_touch_icon_url": "string", "favicon_url": "string", "title": "string", "description": "string", "header_primary_color": "string", "header_background_color": "string", "login_required": true, "locale": "string", "include_in_discourse_discover": true, "mobile_logo_url": "string" } ``` ``` -------------------------------- ### Get Site Info Source: https://docs.discourse.org/ Fetches all categories and subcategories of the Discourse site. This endpoint is useful for getting an overview of the site's structure and available categories. ```APIDOC ## GET /site.json ### Description Fetches all categories and subcategories of the Discourse site. This endpoint is useful for getting an overview of the site's structure and available categories. ### Method GET ### Endpoint /site.json ### Response #### Success Response (200) This endpoint returns a comprehensive JSON object containing site information, including all categories and subcategories. The exact structure of the response is extensive and detailed, mirroring the structure of the category object returned by the `/c/{id}/show.json` endpoint but aggregated for the entire site. ### Response Example (Response structure is extensive and includes all categories and subcategories. Refer to the detailed response structure of `/c/{id}/show.json` for individual category details, which are nested within the site response.) ``` -------------------------------- ### Create Backup Response Sample Source: https://docs.discourse.org/ A successful response after creating a backup. It typically returns a success message. ```json { "success": "OK" } ``` -------------------------------- ### OpenAPI Search Query Example Source: https://docs.discourse.org/openapi.json Demonstrates a complex search query string for the /search.json endpoint, including user mentions, category, tags, date ranges, and ordering. ```text api @blake #support tags:api after:2021-06-04 in:unseen in:open order:latest_topic ``` -------------------------------- ### Get Site Info Endpoint Source: https://docs.discourse.org/ This endpoint retrieves all categories and subcategories of the site. It's useful for getting a comprehensive overview of the site's structure. ```http GET https://{defaultHost}/site.json ``` -------------------------------- ### Request Body for Getting Specific Posts Source: https://docs.discourse.org/ This JSON payload is used to specify which post IDs to retrieve when calling the API to get specific posts from a topic. ```json { "post_ids[]": 0 } ``` -------------------------------- ### User Options Response Sample Source: https://docs.discourse.org/ This snippet shows the structure of a typical response when retrieving user options. It details various preferences like notification levels, theme settings, and privacy controls. ```json { "user_option": { "user_id": 0, "mailing_list_mode": true, "mailing_list_mode_frequency": 0, "email_digests": true, "email_level": 0, "email_messages_level": 0, "external_links_in_new_tab": true, "bookmark_auto_delete_preference": 0, "color_scheme_id": "string", "dark_scheme_id": "string", "dynamic_favicon": true, "enable_quoting": true, "enable_smart_lists": true, "enable_markdown_monospace_font": true, "enable_defer": true, "digest_after_minutes": 0, "automatically_unpin_topics": true, "auto_track_topics_after_msecs": 0, "notification_level_when_replying": 0, "new_topic_duration_minutes": 0, "email_previous_replies": 0, "email_in_reply_to": true, "like_notification_frequency": 0, "notify_on_linked_posts": true, "enable_upcoming_change_available_notifications": true, "include_tl0_in_digests": true, "theme_ids": [ null ], "theme_key_seq": 0, "allow_private_messages": true, "enable_allowed_pm_users": true, "homepage_id": "string", "hide_profile_and_presence": true, "hide_profile": true, "hide_presence": true, "text_size": "string", "text_size_seq": 0, "title_count_mode": "string", "timezone": "string", "skip_new_user_tips": true, "default_calendar": "string", "oldest_search_log_date": "string", "sidebar_link_to_filtered_list": true, "sidebar_show_count_of_new_items": true, "watched_precedence_over_muted": true, "seen_popups": [ ], "topics_unread_when_closed": true, "composition_mode": 0, "interface_color_mode": 0, "show_original_content": true } } ``` -------------------------------- ### Authenticate GET Request Source: https://docs.discourse.org/ Use this format to make authenticated GET requests to the Discourse API. Ensure you replace the placeholder URL, Api-Key, and Api-Username with your actual credentials. ```bash curl -X GET "http://127.0.0.1:3000/admin/users/list/active.json" \ -H "Api-Key: 714552c6148e1617aeab526d0606184b94a80ec048fc09894ff1a72b740c5f19" \ -H "Api-Username: system" ``` -------------------------------- ### List Backups JSON Response Sample Source: https://docs.discourse.org/ This sample shows the structure of a successful response when listing backups. Each backup object includes its filename, size, and last modified timestamp. ```json [ { "filename": "string", "size": 0, "last_modified": "string" } ] ``` -------------------------------- ### Topic Permissions and Details Sample Source: https://docs.discourse.org/ This JSON snippet shows a sample response detailing topic permissions and information about participants and creators. It's useful for understanding the structure of topic-related API calls. ```json { "can_archive_topic": true, "can_split_merge_topic": true, "can_edit_staff_notes": true, "can_toggle_topic_visibility": true, "can_pin_unpin_topic": true, "can_banner_topic": true, "can_moderate_category": true, "can_remove_self_id": 0, "participants": [ { "id": 0, "username": "string", "name": "string", "avatar_template": "string", "post_count": 0, "primary_group_name": "string", "flair_name": "string", "flair_url": "string", "flair_bg_color": "string", "flair_group_id": 0, "admin": true, "moderator": true, "trust_level": 0 } ], "created_by": { "id": 0, "username": "string", "name": "string", "avatar_template": "string" }, "last_poster": { "id": 0, "username": "string", "name": "string", "avatar_template": "string" } } ``` -------------------------------- ### Get a specific tag Source: https://docs.discourse.org/ Retrieves details for a specific tag by its name. ```APIDOC ## Get a specific tag ### Description Retrieves details for a specific tag by its name. ### Method GET ### Endpoint /tag/{name}.json ### Parameters #### Path Parameters - **name** (string) - Required - The name of the tag. ### Responses #### Success Response (200) (Response details not provided in source text) ``` -------------------------------- ### Get user notifications Source: https://docs.discourse.org/ Retrieves a list of notifications for the current user. ```APIDOC ## Get the notifications that belong to the current user ### Description Retrieves a list of notifications for the current user. ### Method GET ### Endpoint /notifications.json ### Response #### Success Response (200) - **notifications** (array) - A list of notification objects. - **id** (integer) - The notification ID. - **user_id** (integer) - The ID of the user the notification belongs to. - **notification_type** (integer) - The type of notification. - **read** (boolean) - Whether the notification has been read. - **created_at** (string) - The timestamp when the notification was created. - **post_number** (integer) - The post number associated with the notification. - **topic_id** (integer) - The ID of the topic associated with the notification. - **slug** (string) - The slug of the topic. - **data** (object) - Additional data related to the notification. - **badge_id** (integer) - The ID of the badge, if applicable. - **badge_name** (string) - The name of the badge, if applicable. - **badge_slug** (string) - The slug of the badge, if applicable. - **badge_title** (boolean) - The title of the badge, if applicable. - **username** (string) - The username associated with the notification data. - **total_rows_notifications** (integer) - The total number of notifications. - **seen_notification_id** (integer) - The ID of the last seen notification. - **load_more_notifications** (string) - A URL to load more notifications. ### Response Example ```json { "notifications": [ { "id": 0, "user_id": 0, "notification_type": 0, "read": true, "created_at": "string", "post_number": 0, "topic_id": 0, "slug": "string", "data": { "badge_id": 0, "badge_name": "string", "badge_slug": "string", "badge_title": true, "username": "string" } } ], "total_rows_notifications": 0, "seen_notification_id": 0, "load_more_notifications": "string" } ``` ``` -------------------------------- ### Response Sample for User Creation Source: https://docs.discourse.org/ This JSON response indicates the success of a user creation request, providing a success status, activation status, a message, and the newly created user's ID. ```json { "success": true, "active": true, "message": "string", "user_id": 0 } ``` -------------------------------- ### Get a group Source: https://docs.discourse.org/ Retrieves details for a specific group using its name. ```APIDOC ## GET /groups/{name}.json ### Description Retrieves information about a specific group using its name. ### Method GET ### Endpoint https://{defaultHost}/groups/{name}.json ### Parameters #### Path Parameters - **name** (string) - Required - The name of the group to retrieve. Use the group name instead of its ID. ### Response #### Success Response (200) - **group** (object) - Contains detailed information about the group. - **id** (integer) - The unique identifier for the group. - **automatic** (boolean) - Indicates if the group is automatic. - **name** (string) - The name of the group. - **user_count** (integer) - The number of users in the group. - **mentionable_level** (integer) - The mentionable level for the group. - **messageable_level** (integer) - The messageable level for the group. - **visibility_level** (integer) - The visibility level of the group. - **primary_group** (boolean) - Indicates if it's a primary group. - **title** (string) - The title of the group. - **grant_trust_level** (string) - Trust level granted by this group. - **incoming_email** (string) - Incoming email address for the group. - **has_messages** (boolean) - Indicates if the group has messages. - **flair_url** (string) - URL for the group's flair. - **flair_bg_color** (string) - Background color of the flair. - **flair_color** (string) - Color of the flair. - **bio_raw** (string) - Raw biographical information. - **bio_cooked** (string) - Cooked (rendered) biographical information. - **bio_excerpt** (string) - An excerpt of the group's biography. - **public_admission** (boolean) - Indicates if public admission is allowed. - **public_exit** (boolean) - Indicates if public exit is allowed. - **allow_membership_requests** (boolean) - Indicates if membership requests are allowed. - **full_name** (string) - The full name of the group. - **default_notification_level** (integer) - Default notification level for members. - **membership_request_template** (string) - Template for membership requests. - **is_group_user** (boolean) - Indicates if the current user is part of the group. - **members_visibility_level** (integer) - Visibility level for members. - **can_see_members** (boolean) - Indicates if members can be seen. - **can_admin_group** (boolean) - Indicates if the user can administer the group. - **can_edit_group** (boolean) - Indicates if the user can edit the group. - **publish_read_state** (boolean) - Indicates if read state is published. - **is_group_owner_display** (boolean) - Indicates if the user is displayed as an owner. - **mentionable** (boolean) - Indicates if the group is mentionable. - **messageable** (boolean) - Indicates if the group is messageable. - **automatic_membership_email_domains** (string) - Email domains that automatically grant membership. - **smtp_updated_at** (string) - Timestamp of the last SMTP update. - **smtp_updated_by** (object) - User who last updated SMTP settings. - **smtp_enabled** (boolean) - Indicates if SMTP is enabled. - **smtp_server** (string) - SMTP server address. - **smtp_port** (string) - SMTP server port. - **smtp_ssl_mode** (integer) - SMTP SSL mode. - **email_username** (string) - Email username for SMTP. - **email_from_alias** (string) - Email from alias for SMTP. - **email_password** (string) - Email password for SMTP. - **message_count** (integer) - Number of messages in the group. - **allow_unknown_sender_topic_replies** (boolean) - Allows replies from unknown senders. - **associated_group_ids** (array) - Array of associated group IDs. - **watching_category_ids** (array) - Array of category IDs the group is watching. - **tracking_category_ids** (array) - Array of category IDs the group is tracking. - **watching_first_post_category_ids** (array) - Array of category IDs where the group watches the first post. - **regular_category_ids** (array) - Array of category IDs where the group has regular access. - **muted_category_ids** (array) - Array of category IDs the group is muted in. - **watching_tags** (array) - Array of tags the group is watching. - **watching_first_post_tags** (array) - Array of tags where the group watches the first post. - **tracking_tags** (array) - Array of tags the group is tracking. - **regular_tags** (array) - Array of tags the group has regular access. - **muted_tags** (array) - Array of tags the group is muted in. - **extras** (object) - Additional information. - **visible_group_names** (array) - Array of visible group names. ### Response Example (200) ```json { "group": { "id": 0, "automatic": true, "name": "string", "user_count": 0, "mentionable_level": 0, "messageable_level": 0, "visibility_level": 0, "primary_group": true, "title": "string", "grant_trust_level": "string", "incoming_email": "string", "has_messages": true, "flair_url": "string", "flair_bg_color": "string", "flair_color": "string", "bio_raw": "string", "bio_cooked": "string", "bio_excerpt": "string", "public_admission": true, "public_exit": true, "allow_membership_requests": true, "full_name": "string", "default_notification_level": 0, "membership_request_template": "string", "is_group_user": true, "members_visibility_level": 0, "can_see_members": true, "can_admin_group": true, "can_edit_group": true, "publish_read_state": true, "is_group_owner_display": true, "mentionable": true, "messageable": true, "automatic_membership_email_domains": "string", "smtp_updated_at": "string", "smtp_updated_by": { }, "smtp_enabled": true, "smtp_server": "string", "smtp_port": "string", "smtp_ssl_mode": 0, "email_username": "string", "email_from_alias": "string", "email_password": "string", "message_count": 0, "allow_unknown_sender_topic_replies": true, "associated_group_ids": [ null ], "watching_category_ids": [ null ], "tracking_category_ids": [ null ], "watching_first_post_category_ids": [ null ], "regular_category_ids": [ null ], "muted_category_ids": [ null ], "watching_tags": [ null ], "watching_first_post_tags": [ null ], "tracking_tags": [ null ], "regular_tags": [ null ], "muted_tags": [ null ] }, "extras": { "visible_group_names": [ null ] } } ``` ``` -------------------------------- ### Sample JSON Response for Users and Topics Source: https://docs.discourse.org/ This is a sample JSON response structure that might be returned when querying user and topic information. ```json { "users": [ { "id": 0, "username": "string", "name": "string", "avatar_template": "string" } ], "primary_groups": [ null ], "topic_list": { "can_create_topic": true, "draft": "string", "draft_key": "string", "draft_sequence": 0, "per_page": 0, "tags": [ { "id": 0, "name": "string", "topic_count": 0, "staff": true } ], "topics": [ { "id": 0, "title": "string", "fancy_title": "string", "slug": "string", "posts_count": 0, "reply_count": 0, "highest_post_number": 0, "image_url": "string", "created_at": "string", "last_posted_at": "string", "bumped": true, "bumped_at": "string", "archetype": "string", "unseen": true, "last_read_post_number": 0, "unread_posts": 0, "pinned": true, "unpinned": "string", "visible": true, "closed": true, "archived": true, "notification_level": 0, "bookmarked": true, "liked": true, "tags": [ null ], "views": 0, "like_count": 0, "has_summary": true, "last_poster_username": "string", "category_id": 0, "pinned_globally": true, "featured_link": "string", "posters": [ { "extras": "string", "description": "string", "user_id": 0, "primary_group_id": 0 } ] } ] } } ``` -------------------------------- ### 200 OK Response Sample for Top Topics Source: https://docs.discourse.org/ This is a sample JSON response for a successful request to retrieve top topics. It includes user information and a list of topics with their details. ```json { "users": [ { "id": 0, "username": "string", "name": "string", "avatar_template": "string" } ], "primary_groups": [ null ], "topic_list": { "can_create_topic": true, "draft": "string", "draft_key": "string", "draft_sequence": 0, "per_page": 0, "topics": [ { "id": 0, "title": "string", "fancy_title": "string", "slug": "string", "posts_count": 0, "reply_count": 0, "highest_post_number": 0, "image_url": "string", "created_at": "string", "last_posted_at": "string", "bumped": true, "bumped_at": "string", "archetype": "string", "unseen": true, "last_read_post_number": 0, "unread_posts": 0, "pinned": true, "unpinned": "string", "visible": true, "closed": true, "archived": true, "notification_level": 0, "bookmarked": true, "liked": true, "views": 0, "like_count": 0, "has_summary": true, "last_poster_username": "string", "category_id": 0, "op_like_count": 0, "pinned_globally": true, "featured_link": "string", "posters": [ { "extras": "string", "description": "string", "user_id": 0, "primary_group_id": 0 } ] } ] } } ``` -------------------------------- ### Get Group Members Source: https://docs.discourse.org/openapi.json Retrieves a list of members belonging to a specific group. ```APIDOC ## GET /groups/{name}/members.json ### Description Retrieves a list of members belonging to a specific group. ### Method GET ### Endpoint /groups/{name}/members.json ### Parameters #### Path Parameters - **name** (string) - Required - The name of the group whose members are to be retrieved. ``` -------------------------------- ### Create Backup Source: https://docs.discourse.org/openapi.json Creates a new backup of the Discourse instance. ```APIDOC ## POST /admin/backups.json ### Description Creates a new backup of the Discourse instance. ### Method POST ### Endpoint /admin/backups.json ### Request Body - **with_uploads** (boolean) - Required - Whether to include uploads in the backup. ### Response #### Success Response (200) - **success** (string) - Indicates the status of the backup creation. Example: "OK" ``` -------------------------------- ### Get a list of tags Source: https://docs.discourse.org/ Retrieves a list of all tags available on the Discourse site. ```APIDOC ## Get a list of tags ### Description Retrieves a list of all tags available on the Discourse site. ### Method GET ### Endpoint /tags.json ### Responses #### Success Response (200) - **tags** (array) - **id** (integer) - **text** (string) - **name** (string) - **count** (integer) - **pm_count** (integer) - **target_tag** (string) - **extras** (object) - **categories** (array) ### Response Example ```json { "tags": [ { "id": 0, "text": "string", "name": "string", "count": 0, "pm_count": 0, "target_tag": "string" } ], "extras": { "categories": [ null ] } } ``` ``` -------------------------------- ### Single invite creation response Source: https://docs.discourse.org/ This is a sample response for creating a single invite, including its key and link. ```json { "id": 42, "invite_key": "string", "link": "http://example.com/invites/9045fd767efe201ca60c6658bcf14158", "description": "string", "email": "not-a-user-yet@example.com", "domain": "string", "emailed": false, "can_delete_invite": true, "custom_message": "Hello world!", "created_at": "2021-01-01T12:00:00.000Z", "updated_at": "2021-01-01T12:00:00.000Z", "expires_at": "2021-02-01T12:00:00.000Z", "expired": false, "topics": [ ], "groups": [ ] } ``` -------------------------------- ### Get Private Messages Source: https://docs.discourse.org/ Retrieves a list of private messages for a specific user. ```APIDOC ## GET /get/topics/private-messages/{username}.json ### Description Retrieves a list of private messages for a specific user. ### Method GET ### Endpoint /get/topics/private-messages/{username}.json ### Parameters #### Path Parameters - **username** (string) - Required - The username of the user whose private messages are to be retrieved. ### Response #### Success Response (200) - Description: A list of private messages for the specified user. ### Endpoint https://{defaultHost}/topics/private-messages/{username}.json ``` -------------------------------- ### POST /login Source: https://docs.discourse.org/openapi.json Logs in a user with the provided username and password. ```APIDOC ## POST /login ### Description Logs in a user with the provided username and password. ### Method POST ### Endpoint /login ### Request Body - **username** (string) - Required - **password** (string) - Required ### Request Example { "username": "string", "password": "string" } ### Response #### Success Response (200) - Description: success response ``` -------------------------------- ### GET /u/{username}/emails.json Source: https://docs.discourse.org/openapi.json Retrieves the email addresses associated with a specific user. ```APIDOC ## GET /u/{username}/emails.json ### Description Get email addresses belonging to a user ### Method GET ### Endpoint /u/{username}/emails.json ### Parameters #### Path Parameters - **username** (string) - Required - The username of the user whose emails are to be retrieved. ### Response #### Success Response (200) - **email** (string) - **secondary_emails** (array) - **unconfirmed_emails** (array) - **associated_accounts** (array) #### Response Example { "email": "string", "secondary_emails": [], "unconfirmed_emails": [], "associated_accounts": [] } ``` -------------------------------- ### Initiates a direct external upload Source: https://docs.discourse.org/ This endpoint initiates a direct upload to an external provider, bypassing the standard upload route. It returns a unique identifier and a presigned URL for uploading the file binary. After the upload to the external service is complete, the `POST /complete-external-upload` route must be called. ```APIDOC ## POST /uploads/generate-presigned-put.json ### Description Initiates a direct external upload by returning a presigned URL for uploading the file binary to an external provider. ### Method POST ### Endpoint https://{defaultHost}/uploads/generate-presigned-put.json ### Parameters #### Request Body - **type** (string) - Required - Enum: "avatar", "profile_background", "card_background", "custom_emoji", "composer" - **file_name** (string) - Required - **file_size** (integer) - Required - File size should be represented in bytes. - **metadata** (object) - Optional ### Response #### Success Response (200) - **external_upload_id** (string) - A unique identifier for the external upload. - **upload_url** (string) - A presigned URL where the file binary should be uploaded. #### Response Example ```json { "external_upload_id": "unique-upload-id", "upload_url": "https://s3.amazonaws.com/your-bucket/path/to/file?signature=..." } ``` ``` -------------------------------- ### Get a user by id Source: https://docs.discourse.org/ Retrieves detailed information about a specific user identified by their ID. ```APIDOC ## GET /admin/users/{id}.json ### Description Retrieves a specific user's details using their unique ID. ### Method GET ### Endpoint /admin/users/{id}.json ### Parameters #### Path Parameters - **id** (integer) - Required ### Response #### Success Response (200) (The response structure for this endpoint is detailed in the 'List users by flag' section, as it appears to return the same user object format.) ``` -------------------------------- ### Get User by ID Source: https://docs.discourse.org/ Retrieves a specific user's details by their unique ID. ```APIDOC ## Get a User by ID ### Description Retrieves a specific user's details by their unique ID. ### Method GET ### Endpoint /admin/users/{id}.json ### Parameters #### Path Parameters - **id** (integer) - Required - The unique identifier of the user. ### Response #### Success Response (200) - **response** (object) - User details. ### Response Example ```json { "user": { "id": 0, "username": "string", "name": "string", "avatar_template": "string", "title": "string" } } ``` ``` -------------------------------- ### Creates a user Source: https://docs.discourse.org/ Creates a new user in the system. Requires API Key and Username in headers, and user details in the request body. ```APIDOC ## POST /users.json ### Description Creates a new user. ### Method POST ### Endpoint /users.json ### Parameters #### Header Parameters - **Api-Key** (string) - Required - Your API key. - **Api-Username** (string) - Required - The username associated with the API key. #### Request Body - **name** (string) - Required - The full name of the user. - **email** (string) - Required - The email address of the user. - **password** (string) - Required - The password for the new user. - **username** (string) - Required - The username for the new user. - **active** (boolean) - Optional - Whether the user account is active. Requires admin API key. - **approved** (boolean) - Optional - Whether the user account is approved. - **user_fields** (object) - Optional - Custom user fields. - **external_ids** (object) - Optional - External user identifiers. ### Request Example ```json { "name": "string", "email": "string", "password": "string", "username": "string", "active": true, "approved": true, "user_fields": { "1": true }, "external_ids": { } } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the user creation was successful. - **active** (boolean) - The active status of the created user. - **message** (string) - A message indicating the result of the operation. - **user_id** (integer) - The ID of the newly created user. ### Response Example ```json { "success": true, "active": true, "message": "string", "user_id": 0 } ``` ``` -------------------------------- ### Get a single tag group Source: https://docs.discourse.org/ Retrieves details for a specific tag group by its ID. ```APIDOC ## Get a single tag group ### Description Retrieves details for a specific tag group by its ID. ### Method GET ### Endpoint /tag_groups/{id}.json ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the tag group. ### Responses #### Success Response (200) - **tag_group** (object) - **id** (integer) - **name** (string) - **tag_names** (array) - **parent_tag_name** (array) - **one_per_topic** (boolean) - **permissions** (object) ### Response Example ```json { "tag_group": { "id": 0, "name": "string", "tag_names": [ null ], "parent_tag_name": [ null ], "one_per_topic": true, "permissions": { "everyone": 0 } } } ``` ``` -------------------------------- ### downloadBackup Source: https://docs.discourse.org/openapi.json Allows users to download a backup file. Requires the filename and a token for authentication. ```APIDOC ## GET /download/backup ### Description Provides a link to download a backup file. Requires the filename and an authentication token. ### Method GET ### Endpoint /download/backup ### Parameters #### Path Parameters - **filename** (string) - Required - The name of the backup file to download. #### Query Parameters - **token** (string) - Required - The authentication token for accessing the backup. ``` -------------------------------- ### Get User by ID Source: https://docs.discourse.org/ Retrieves detailed information about a specific user identified by their unique ID. ```json { "id": 0, "username": "string", "name": "string", "avatar_template": "string", "email": "string", "secondary_emails": [ null ], "active": true, "admin": true, "moderator": true, "last_seen_at": "string", "last_emailed_at": "string", "created_at": "string", "last_seen_age": 0, "last_emailed_age": 0, "created_at_age": 0, "trust_level": 0, "manual_locked_trust_level": "string", "title": "string", "time_read": 0, "staged": true, "days_visited": 0, "posts_read_count": 0, "topics_entered": 0, "post_count": 0 } ``` -------------------------------- ### Authenticate POST Request Source: https://docs.discourse.org/ This example demonstrates how to make an authenticated POST request to create a new category in Discourse. It includes setting the Content-Type and providing necessary form data. ```bash curl -X POST "http://127.0.0.1:3000/categories" \ -H "Content-Type: multipart/form-data;" \ -H "Api-Key: 714552c6148e1617aeab526d0606184b94a80ec048fc09894ff1a72b740c5f19" \ -H "Api-Username: system" \ -F "name=89853c20-4409-e91a-a8ea-f6cdff96aaaa" \ -F "color=49d9e9" \ -F "text_color=f0fcfd" ``` -------------------------------- ### Response Sample for Post Action Source: https://docs.discourse.org/ This is a sample JSON response when a post action is successfully updated. It includes details about the post and user. ```json { "id": 0, "name": "string", "username": "string", "avatar_template": "string", "created_at": "string", "cooked": "string", "post_number": 0, "post_type": 0, "posts_count": 0, "updated_at": "string", "reply_count": 0, "reply_to_post_number": "string", "quote_count": 0, "incoming_link_count": 0, "reads": 0, "readers_count": 0, "score": 0, "yours": true, "topic_id": 0, "topic_slug": "string", "display_username": "string", "primary_group_name": "string", "flair_name": "string", "flair_url": "string", "flair_bg_color": "string", "flair_color": "string", "flair_group_id": 0, "badges_granted": [ ], "version": 0, "can_edit": true, "can_delete": true, "can_recover": true, "can_see_hidden_post": true, "can_wiki": true, "user_title": "string", "bookmarked": true, "actions_summary": [ { "id": 0, "count": 0, "acted": true, "can_undo": true, "can_act": true } ], "moderator": true, "admin": true, "staff": true, "user_id": 0, "hidden": true, "trust_level": 0, "deleted_at": "string", "user_deleted": true, "edit_reason": "string", "can_view_edit_history": true, "wiki": true, "reviewable_id": 0, "reviewable_score_count": 0, "reviewable_score_pending_count": 0, "post_url": "string" } ``` -------------------------------- ### Get a list of tag groups Source: https://docs.discourse.org/ Retrieves a list of all tag groups configured for the Discourse site. ```APIDOC ## Get a list of tag groups ### Description Retrieves a list of all tag groups configured for the Discourse site. ### Method GET ### Endpoint /tag_groups.json ### Responses #### Success Response (200) - **tag_groups** (array) - **id** (integer) - **name** (string) - **tags** (array) - **id** (integer) - **name** (string) - **slug** (string) - **parent_tag** (array) - **id** (integer) - **name** (string) - **slug** (string) - **one_per_topic** (boolean) - **permissions** (object) ### Response Example ```json { "tag_groups": [ { "id": 0, "name": "string", "tags": [ { "id": 0, "name": "string", "slug": "string" } ], "parent_tag": [ { "id": 0, "name": "string", "slug": "string" } ], "one_per_topic": true, "permissions": { "property1": 0, "property2": 0 } } ] } ``` ``` -------------------------------- ### JSON Response Structure for Search Source: https://docs.discourse.org/ Example of a successful JSON response when querying the search endpoint. ```json { "posts": [ null ], "users": [ null ], "categories": [ null ], "tags": [ { "id": 0, "name": "string", "slug": "string" } ], "groups": [ null ], "grouped_search_result": { "more_posts": "string", "more_users": "string", "more_categories": "string", "term": "string", "search_log_id": 0, "more_full_page_results": "string", "can_create_topic": true, "error": "string", "extra": { "categories": [ ] }, "post_ids": [ null ], "user_ids": [ null ], "category_ids": [ null ], "tag_ids": [ null ], "group_ids": [ null ] } } ``` -------------------------------- ### Initiate Direct External Upload Source: https://docs.discourse.org/openapi.json Begins the process for direct external uploads to a provider like S3. Returns a unique identifier and a presigned URL for uploading the file. After upload, POST to /complete-external-upload. ```APIDOC ## POST /uploads/generate-presigned-put.json ### Description Initiates a direct external upload, allowing files to be uploaded directly to an external provider (e.g., S3) bypassing the standard POST /uploads route. This route returns a unique identifier and a presigned URL for the upload. ### Method POST ### Endpoint /uploads/generate-presigned-put.json ### Parameters ### Request Body This endpoint does not require a request body for initiating the upload. ### Response #### Success Response (200) - **key** (string) - A unique identifier for the external upload. - **url** (string) - A presigned URL where the file binary blob should be uploaded. #### Response Example { "key": "your_upload_key", "url": "https://your-s3-bucket.s3.amazonaws.com/path/to/your/upload?AWSAccessKeyId=..." } ``` -------------------------------- ### Create multiple invites Source: https://docs.discourse.org/ Use this endpoint to create multiple invites simultaneously. Provide a list of emails and shared properties for all invites. ```json { "email": [ "not-a-user-yet-1@example.com", "not-a-user-yet-2@example.com" ], "skip_email": false, "custom_message": "string", "max_redemptions_allowed": 5, "topic_id": 0, "group_ids": "42,43", "group_names": "foo,bar", "expires_at": "string" } ```