Sections API

The section API supports creating, updating and deleting sections that could be used to categorize your content.

Creating sections

Creates a section.

POST /api/1.3/sections

Parameters

Name Type Description
title String Title - Required
url String Slug - Required
tags Array of strings Tags - Optional
status Integer
Status - Optional
Choices:
- 1: Private (Default)
- 2: Public
- 3: Unlisted
about_html String About - Optional
page_settings Object Page settings - Optional
url_header_image Object URL header image - Optional

Page settings

page_settings is a set of configurations that can be enabled or disabled.

Name Type Description
open_in_new_tab Boolean Controls whether the section must be opened in a new browser tab - Optional - Defaults to false
allow_community_posts Boolean Controls whether community posts can be published in section - Optional - Defaults to false
hide_from_entry_editor Boolean Controls whether the section is listed/available in entry editor - Optional - Defaults to false

Note

After creating a section, this is automatically assigned to posts that match by tags.

Response

{
    "id": 100,
    "title": "My section",
    "url": "my-section",
    "status": 1,
    "domain": null,
    "page_settings": {
        "hide_from_entry_editor": false,
        "allow_community_posts": false,
        "open_in_new_tab": false
    },
    "about_html": "",
    "tags": ["foo", "bar"],
    "url_header_image": "",
    "site_id": 9,
    "created_ts": 1507918417,
    "order": 3,
    "parent_id": 0,
    "type": 2
}

Editing sections

Edits a section.

PUT /api/1.3/sections/<id>

Parameters

The same specification from Creating sections section applies here but there is no required fields.

Note

After updating a section, this is automatically assigned to posts that match by the new tags added and is going to be unassigned from articles by the removed tags.

Response

The same specification from Creating sections section applies here.

Deleting sections

Deletes a section.

DELETE /api/1.3/sections/<id>

Parameters

Name Type Description
destination_section_id Integer Destination section ID - Optional

Note

Parameters need to be sent by query string. Posts are going be moved to destination section if any.

Response

The response payload is an empty object.

{}

List sections

Fetches sections information.

GET /api/1.3/sections

Parameters

No parameters, all sections are returned.

Response

It returns a list of objects described at Creating sections section.

Get a single section

Fetch a single section by ID.

GET /api/1.3/sections/<id>

Response

The same specification from Creating sections section applies here.