Post an Article

You can use this request to post a new article to your AnswerHub site.

/services/v2/article.json

🚧

Permissions & Notes:

  • You must have the Submit kbentry permission under Custom Roles in the Advanced Editor for the space you are attempting to post an article to.
  • If you do not have the custom Publish kbentry permission under Custom Roles in the Advanced Editor your article will go into moderation.
  • You must have the custom Publish kbentry permission under Custom Roles in the Advanced Editor to have the article automatically publish. The system automatically adds this role with the installation of the Knowledge Base plugin.
  • We added this request in version 1.6.3.4.

Sample Request

A POST create an article request for an article with a title ("Article posted from the API"), a body ("This is the body of an article posted through the API"), topics ("testingkb"), and a space ID (spaceId: 11), sent to https://apidocs.cloud.answerhub.com using a human-readable Username/Password (answerhub/test123) would look like this:

curl 
-u answerhub:test123 
-H "Accept: application/json" 
-H "Content-type: application/json" 
-X POST 
-d '{"title":"Article posted from the API","body": "This is the body of an article posted through the API","topics":"testingkb", "spaceId":"11"}' "https://apidocs.cloud.answerhub.com/services/v2/article.json" -v

Expected Response

Succesful Response:

  • HTTP Status 201 - Created

Community User Interface Result

An Article is Created in the Article Content Type

Language
Authentication
Basic
base64
:
Click Try It! to start a request and see the response here!