Start a conversation

Create a Blog Article

You can create a basic blog article on a blog board or any blog board that you prefer.

In this guide, we create a blog article in a blog board.

Requirements

You must have the Start new posts permission set to Grant by Administrator.

Blog Article Permission
Blog Article Permission

Basic Steps

  1. Open the blog board where you want to create a blog article.
  2. Identify the ID of the blog board from the URL of the board as described in the Create a Forum.
  3. Ensure that you have the necessary permission to create the blog article granted by the Administrator.
  4. Create a POST request to create a blog article.

Example

Create a Blog Article

In this example, we are going to create a forum message in the Knight Riders board using a GraphQL query.
After you have created a blog message on the board, make sure you have received success as a response.

  1. Sign in to your community.
  2. Go to the Knight Rider board.
  3. Make a note of the ID of the board.
  4. Make a GraphQL POST request to the board.

The ID of the Klass Forum Board is knight-riders-board.

Here is the GraphQL POST request and response to create a blog article.


mutation createBlogArticle($createInput:CreateBlogArticleInput!) {
   createBlogArticle(createInput: $createInput) {
        result {
            id
            body
            subject
            introduction
            teaser
            contentWorkflow {
                state
            }
        }
   }
}

The mutation here initiates a createBlogArticle function using information passed through GraphQL variables. Here is an example to create a blog article.


{
   "createInput":{
        "subject":"A trip to my hometown",
        "body": "It's been long since I went to my native. This blog is about how I reached my native using my two-wheeler. A shocking incident which too before the start.",
        "teaser": "Lushy and dense green trees in the way.",
        "introduction": "A small trip to my native after a long time.",
        "board":{
            "id":"BOARD:knight-riders-board"
        }
    }
}

Here is the response to the above example.


{
    "data": {
        "createBlogArticle": {
            "result": {
                "id": "message:403",
                "body": "It's been long since I went to my native. This blog is about how I reached my native using my two-wheeler. A shocking incident which too before the start.",
                "subject":"A trip to my hometown",
                "introduction": "A small trip to my native after a long time.",
                "teaser": "Lushy and dense green trees in the way.",
                "contentWorkflow": {
                    "state": "PUBLISH"
                }
            }
        }
    }
}
Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. ATLAS

  2. Posted
  3. Updated

Comments