The Article Object

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>",
"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
"keywords": ["login", "users"],
"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
Date

When article was first created.

updated_at
Date

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

account_id
String

The ID of the account this article belongs to.

category_id
String

The ID of the category this article is displayed in.

user_id
String

The ID of the user that last updated this article.

article_id
String

A unique identifier for this article.

title
String

The title of the article

body
String

An HTML representation of the entire article body

is_private
Boolean

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

is_published
Boolean

Toggle between draft and published post.

multilingual
Array

An array of multilingual article objects. See below. 👇

slug
String

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

keywords
String Array

Keywords we've pulled out from the article text, used to enhance search results.

description
String

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

short_version
String

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

url
String

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"
}

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?