Add article
  • 02 Feb 2022
  • 1 Minute to read
  • Contributors
  • Dark
    Light

Add article

  • Dark
    Light

POST /articles 

Adds an article to an existing category


Header

ParameterTypeDescription
api_tokenstringYou can get the REST API from Settings > Advanced > API tokens.


Body Parameters

ParameterRequiredTypeDescription
titleYesstringTitle of the article
category_idYes
stringThe ID of the category where the article will be created
project_version_idYes
stringThe project version ID in which the article will be created
user_idYes
stringThe ID of the user that will be marked as an author of this article
contentNostringMarkdown content of the article
orderNonumberThe position of the article in the category tree (Default is the end of the category)


Sample Request

{
  "title":"My Article",
  "project_version_id":"7ba483c0-0929-4bb6-aa43-04a2f4bb8453",
  "user_id":"5ae331f74e60146b233512x2",
  "category_id":"650aec55-c0a7-42bf-862c-1eea02b96trt",
  "content" : "## My Header"
}


Sample Response

{
    "data": {
        "id": "b14e9514-20b2-43b0-a750-4a25c75a6fea",
        "title": "My Article",
        "public_version": 0,
        "latest_version": 1,
        "hidden": false,
        "status": 0,
        "order": 6,
        "slug": "my-article"
    },
    "extension_data": null,
    "context": null,
    "success": true,
    "errors": [],
    "warnings": [],
    "information": []
}


Response Data

ParameterTypeDescription
idstringThe ID of the article
titlestringArticle title
public_versionnumberThe version number that is currently published
latest_versionnumberThe latest version number of this article
hiddenbooleanIndicates if the article is visible on the site
statusenumeratedThe status of the article: 0 - Draft, 1 - InReview, 2 - Public, 3 - Published, 4 - Deleted
ordernumberThe position inside the parent category
slugstringThe slug of the article

Was this article helpful?

What's Next