The Article Object

Taylor Sloane Updated by Taylor Sloane

Articles returned by the API look a little like this:

{
// Dates
"created_at": ISODate("2016-06-26T15:30:38.731Z"),
"updated_at": ISODate("2016-06-26T15:40:28.926Z"),
// Identifiers
"account_id": "test_account_id",
"category_id": "test_category_id"
"user_id": "test_user_id",
"article_id": "test_article_id",
// Mutable Properties
"title": "Logging In To Your HelpDocs",
"body": "<p>To improve the experience for your end users...</p>",
"tags": ["test1", "test2"],
"is_private": false,
"is_published": true,
"multilingual": [ MultilingualArticle ],
"slug": "logging-in-to-your-help-docs",
"description": "To improve the experience for your end users...",
"short_version": "To improve the experience for your end users...",
// Calculated Properties
"url": "https://support.helpdocs.io/article/test_article_id-logging-in-to-your-help-docs",
"relative_url": "/article/test_article_id-logging-in-to-your-help-docs"
}

Some fields are mutable (you can edit them) and some are immutable (we update them for you).

Property

created_at

When article was first created.

updated_at

When article was last updated (through the dashboard or the API).

account_id

The ID of the account this article belongs to.

category_id

The ID of the category this article is displayed in.

user_id

The ID of the user that last updated this article.

article_id

A unique identifier for this article.

title

The title of the article

body

An HTML representation of the entire article body

tags

An array of strings the article's been tagged with

is_private

When true, this article is only accessible via direct link.

is_published

Toggle between draft and published post.

multilingual

An array of multilingual article objects. See below. 👇

slug

The URL slug this article appears at (e.g. /article/:article_id-:slug)

description

A plain-text version of the article body, displayed in some themes

short_version

Usually not surfaced in themes, the short version is accessible through the API and used in some HelpDocs integrations

url

The fully qualified URL of this article (respecting custom domain setup)

Multilingual Article Objects

HelpDocs supports the display of articles in multiple languages. The API will return an array of multilingual article objects, each looking like this:

{ 
"language_code": "de",
"is_live": true,
"title": "German title",
"body": "German body",
"tags": ["german", "tag"],
"description": "German description",
"short_version": "German short version",
"slug": "german-slug"
}

The fields map directly to the article fields in the table above, with the exception of is_live, which behaves like the regular is_published.

How did we do?

Getting a Single Article

Updating an Article

Contact

This site is protected by hCaptcha and its Privacy Policy and Terms of Service apply.