Skip to main content

Discourse Operations Reference

Orkes Conductor integrates with Discourse to let you create and manage posts, categories, users, and groups directly from your workflows. Once you configure the Discourse integration, you can use the following operations to create, retrieve, and update content in Discourse without leaving your workflow.

This page covers the parameters and expected output for each operation available in the Discourse integration.

Create Post

Create a new topic or reply to an existing topic.

ParameterDescriptionTypeRequired/Optional
RawThe post content in raw Markdown format.stringRequired.
TitleThe topic title. Required when creating a new topic.stringOptional.
Topic IdThe topic ID to reply to. Required when replying to an existing post; ignore when creating a new topic.
To get the topic ID, open the topic and the topic ID is the integer at the end of the URL: https://<FORUM-BASE-URL>/t/<TOPIC-SLUG>/<TOPIC-ID>.
integerOptional.
CategoryThe category ID to which the new posts must be part of.
To get the category ID, open the specific category and the ID is the integer at the end of the URL:https://<FORUM-BASE-URL>/c/<CATEGORY-NAME>/<CATEGORY-ID>.
integerOptional.
Reply To Post NumberThe post number within the topic to reply to.
To get the post number, open the topic and navigate to the specific post using the timeline slider on the right. The post number is displayed on the slider and also appears at the end of the URL: https://<FORUM-BASE-URL>/t/<TOPIC-SLUG>/<TOPIC-ID>/<POST-NUMBER>.
integerOptional.

Get Post

Retrieve a single post by its ID.

ParameterDescriptionTypeRequired/Optional
IdThe ID of the post to retrieve.
To get the post ID, navigate to the post and append .json to the URL: https://<FORUM-BASE-URL>/t/<TOPIC-SLUG>/<TOPIC-ID>.json. The id field in the response is the post ID.
integerRequired.

List Posts

List latest posts across all topics.

ParameterDescriptionTypeRequired/Optional
BeforeLoad posts with an ID lower than this value. By default, the operation returns the latest posts. Use this parameter to paginate through older posts.
To get the post ID, navigate to the post and append .json to the URL: https://<FORUM-BASE-URL>/t/<TOPIC-SLUG>/<TOPIC-ID>.json. The id field in the response is the post ID.
integerOptional.

Update Post

Update the content of an existing post.

ParameterDescriptionTypeRequired/Optional
IdThe post ID to update.
To get the post ID, navigate to the post and append .json to the URL: https://<FORUM-BASE-URL>/t/<TOPIC-SLUG>/<TOPIC-ID>.json. The id field in the response is the post ID.
integerRequired.
RawThe updated post content in raw Markdown format.stringRequired.
Edit ReasonThe reason for the edit, which will be shown in the post history.stringOptional.

Create Category

Create a new category in the Discourse forum.

ParameterDescriptionTypeRequired/Optional
NameThe category name. This will be displayed in the forum navigation.stringRequired.
ColorThe category color as a hex code without #. For example: 0088CC.stringOptional.
Text ColorThe text color as a hex code without #. For example: 0088CC.stringOptional.
Parent CategoryThe category ID of the parent category, if creating a sub-category.
To get the category ID, open the specific category and the ID is the integer at the end of the URL: https://<FORUM-BASE-URL>/c/<CATEGORY-NAME>/<CATEGORY-ID>.
integerOptional.

List Categories

Retrieve all categories from the forum.

ParameterDescriptionTypeRequired/Optional
Include SubcategoriesWhether to include subcategories in the results.booleanOptional.

Update Category

Update an existing category's properties.

ParameterDescriptionTypeRequired/Optional
IdThe category ID to update.
To get the category ID, open the specific category and the ID is the integer at the end of the URL: https://<FORUM-BASE-URL>/c/<CATEGORY-NAME>/<CATEGORY-ID>.
integerRequired.
NameThe updated category name. This will be displayed in the forum navigation.stringOptional.
ColorThe updated category color as a hex code without #. For example: 0088CC.stringOptional.
Text ColorThe updated text color as a hex code without #. For example: 0088CC.stringOptional.

Create User

Create a new user account.

ParameterDescriptionTypeRequired/Optional
UsernameThe username. Alphanumeric characters and underscores are allowed.stringRequired.
EmailThe email address of the user.stringRequired.
PasswordThe password for the user account.stringRequired.
NameThe display name of the user.stringRequired.
ActiveWhether the user account is active.booleanOptional.
ApprovedWhether the user account is approved.booleanOptional.

Get User

Get a user profile by username.

ParameterDescriptionTypeRequired/Optional
UsernameThe username to retrieve.

Admins can get the username from Admin > Users.
stringRequired.

List Users

List users with optional filtering (admin only).

ParameterDescriptionTypeRequired/Optional
FlagFilter users by status. Supported values:
  • active
  • new
  • staff
  • suspended
  • blocked
  • suspect
Defaults to active.
stringOptional.
OrderThe field to sort results by. Supported values:
  • created
  • last_emailed
  • seen
  • username
  • email
  • trust_level
stringOptional.
AscendingWhether to sort the results in ascending order.booleanOptional.
PageThe page number for pagination. Defaults to 1.integerOptional.

Create Group

Create a new user group.

ParameterDescriptionTypeRequired/Optional
NameThe group name in lowercase with no spaces. Used for @mentions.stringRequired.

| Bio Raw | The group description in raw Markdown format. | string | Optional. | | Visibility Level | The visibility level of the group. Supported values:

  • 0 (public)
  • 1 (logged_in)
  • 2 (members)
  • 3 (staff)
  • 4 (owners)
| integer | Optional. | | Full Name | The full display name of the group shown in the UI. | string | Optional. |

Get Group

Get details of a specific group by name.

ParameterDescriptionTypeRequired/Optional
NameThe name of the group to retrieve. It must be the group name (the part that comes after @) and not the display name.stringRequired.

List Groups

List all groups in the forum.

This operation has no input parameters.

Update Group

Update an existing group's properties.

ParameterDescriptionTypeRequired/Optional
IdThe group ID to update.
To get the group ID, navigate to the group and append .json to the URL: https://<FORUM-BASE-URL>/g/<GROUP-SLUG>.json. The id field in the response is the group ID.
stringRequired.
NameThe update group name in lowercase with no spaces. Used for @mentions. This also updates the group URL and the old URL will no longer work.stringOptional.
Full NameThe updated display name of the group shown in the UI.stringOptional.
Bio RawThe updated group description in raw Markdown format.stringOptional.

Add User to Group

Add one or more users to a group.

ParameterDescriptionTypeRequired/Optional
Group IdThe group ID to add the users to.
To get the group ID, navigate to the group and append .json to the URL: https://<FORUM-BASE-URL>/g/<GROUP-SLUG>.json. The id field in the response is the group ID.
stringRequired.
UsernamesThe comma-separated list of usernames to add to the group.stringRequired.

Remove User from Group

Remove one or more users from a group.

ParameterDescriptionTypeRequired/Optional
Group IdThe group ID to remove the users from.
To get the group ID, navigate to the group and append .json to the URL: https://<FORUM-BASE-URL>/g/<GROUP-SLUG>. The id field in the response is the group ID.
stringRequired.
UsernamesThe comma-separated list of usernames to remove from the group.stringRequired.