ScreenSteps

Creating Manuals, Chapters and Articles through the API

Updated on

This article describes how to create Manuals, Chapter and Articles via the API.

All updates you make via the API will appear in Activity logs as if they were done by the user whose credentials are used when making the API calls.

1. Create a Manual

URL

POST /api/v2/sites/:site_id/manuals
Click to copy

Body

manual: {
  title: "My title",
  published: false,
  chapters: [
    { position: 1, title: "Chapter 1", published: false },
    { position: 2, title: "Chapter 2", published: false },
  ]
}
Click to copy

Explanation

Key
Value
title
Manual title. Up to 255 characters.
published
Boolean
chapters
Optional array of a chapter JSON hashes. Each hash must contain:

  • position
  • title
The pubished key is optional.
2. Update a Manual

URL

PUT /api/v2/sites/:site_id/manuals/:id
Click to copy

Body

Body is the same as is used when creating a manual except that the chapters array is ignored.

3. Delete a Manual

URL

DELETE /api/v2/sites/:site_id/manuals/:id
Click to copy
4. Create a Chapter

URL

POST /api/v2/sites/:site_id/chapters
Click to copy

Body

chapter: {
  position: 1,
  title: "My title",
  published: false,
  manual_id: 4415
}
Click to copy

Explanation

Key
Value
position
Position of the chapter in the manual
title
Chapter title. Up to 255 characters.
published
Boolean
manual_id
ID of the manual the chapter is assigned to.
5. Update a Chapter

URL

PUT /api/v2/sites/:site_id/chapters/:id
Click to copy

Body

Body is the same as is used when creating a chapter with one addition. You can also include an articles array of article ids and positions to update the contents of a chapter. See the example below.

chapter: {
  position: 1,
  title: "My title",
  published: false,
  manual_id: 4415
}
Click to copy
6. Updating the Articles and their positions in a Chapter

URL

PUT /api/v2/sites/:site_id/chapters/:id/update_article_positions
Click to copy

Body

Body is the same as is used when creating a chapter with one addition. You can also include an articles array of article ids and positions to update the contents of a chapter. See the example below.

articles: [
  { id: 1421, position: 1 },
  { id: 8817, position: 2 }
]
Click to copy
7. Delete a Chapter

URL

DELETE /api/v2/sites/:site_id/chapters/:id
Click to copy
8. Create an Article

URL

POST /api/v2/sites/:site_id/articles
Click to copy

Body

article: {
  position: 1,
  title: "My title",
  published: false,
  chapter_id: 315
}
Click to copy

Explanation

Key
Value
position
Position of the article in the chapter.
title
Article title. Up to 255 characters.
published
Boolean
manual_id
ID of the chapter the article is assigned to.
meta_search
Additional search terms for the article. Up to 255 characters.
meta_description
The description that is shown to search engines. Up to 255 characters.
meta_title
Page title shown to search engines. Up to 255 characters.
exclude_from_search
Boolean. Determines whether an article will be excluded from the ScreenSteps public search.
tags
An array of tag names.
9. Update Article Properties

URL

PUT /api/v2/sites/:site_id/articles/:id
Click to copy

Body

Body is the same as is used when creating an article except that instead of published, use publish in order to publish the article.

10. Update Article Contents

There is a separate API endpoint for updating article contents. See: Updating article content through the API

11. Delete an Article

This will move the article to the trash.

URL

DELETE /api/v2/sites/:site_id/articles/:id
Click to copy

0 Comments

Add your comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Previous Article Resolving Internal Links in API
Next Article Updating article content through the API
Still Need Help? Contact Us