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

Update article

  • Dark
    Light

PUT /articles/{id}/{langcode} 

Updates an article with the ID


Header

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


Route Parameter

ParameterRequiredTypeDescription
idYesstringThe ID of the article
langCodeYesstringLanguage code for multilingual


Body Parameters

Parameters highlighted in bold are mandatory

ParameterTypeDescription
titlestringArticle title
contentstringArticle markdown content. If the editor type is Markdown, use this property
html_contentstringArticle HTML content. If the editor type is WYSIWYG, use this property
category_idstringMove article to another category
hiddenbooleanHide / Show article
version_numbernumberArticle version to update ( Default is latest )
translation_optionstringIndicates the translation status of the article. 0 - None, 1 - Needs translation, 2 Translated
sourcestringFree text used for future reference


Sample Request

{
  "title":"My New Title",
  "category_id":"650aec55-c0a7-42bf-862c-1eea02b96trt",
  "content" : "## My new content",
  "hidden" : false
}


Sample Response

{
    "data": {
        "id": "8ec54551-a2f3-4d2a-b835-b85afaee8abe",
        "title": "My New Title",
        "content": "## My new content",
        "html_content": null,
        "category_id": "650aec55-c0a7-42bf-862c-1eea02b98efe",
        "project_version_id": "7ba483c0-0929-4bb6-aa43-04a2f4bb8893",
        "version_number": 2,
        "public_version": 1,
        "latest_version": 2,
        "hidden": false,
        "status": 0,
        "order": 0,
        "protection_level": 0,
        "created_by": "5ae331f74e60146b233558c6",
        "authors": [],
        "created_at": "2019-02-18T10:59:53.292Z",
        "modified_at": "2019-02-21T15:15:39.535Z",
        "slug": "my-new-title"
    },
    "extension_data": null,
    "context": null,
    "success": true,
    "errors": [],
    "warnings": [],
    "information": []
}

Response Data

ParameterTypeDescription
idstringThe ID of the article
titlestringArticle title
contentstringArticle markdown content
html_contentstringArticle HTML content
category_idstringThe ID of the parent category
project_version_idstringThe ID of the project version where this article is located
version_numbernumberThe latest version number of this article
latest_versionnumberThe latest version number of this article
public_versionnumberThe version number that is currently published
version_idstringThe ID of the latest article version (revision)
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
protection_levelenumeratedThe access required to view the article: 0 - Public, 1 - LoggedInUsers
authorsobject[]The list of authors that contributed to this article
created_atDateTimeThe date the article was created
modified_atDateTimeThe date the article was last modified
slugstringThe slug of the article

Response > Authors

ParameterTypeDescription
idstringThe ID of the user
first_namestringFirstname of the user
last_namestringLast name of the user
email_idstringEmail address of the user
profile_logo_urlstringProfile image URL of the user
user_roleenumerated1 - Administrator, 2 - Editor, 3 - DraftWriter, 4 - Reader, 7 - Owner
last_login_atDateTimeLast login date of the user
unique_user_namestringUnique username of the user

Was this article helpful?

What's Next