Skip to main content
POST
/
knowledge
/
collections
Create a new collection
curl --request POST \
  --url https://api.getfernand.com/knowledge/collections \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "title": "Getting Started",
  "slug": "getting-started"
}
'
{
  "id": 123,
  "parent_id": 123,
  "title": "<string>",
  "slug": "<string>",
  "description": "<string>",
  "seo_title": "<string>",
  "seo_description": "<string>",
  "icon": "<string>",
  "created": "2023-11-07T05:31:56Z",
  "last_updated": "2023-11-07T05:31:56Z",
  "sort": 123
}
Creates a new collection for organizing articles. Collections can be nested by specifying a parent_id to create sub-collections. The slug must be unique within the knowledge base and URL-safe. If no seo_title is provided, the regular title is used. Collections are automatically assigned a sort order based on their position within their parent. An icon can be specified using emoji identifiers for visual distinction.

Authorizations

X-API-Key
string
header
required

Authenticate your account by including your secret key in API requests. You can manage your API keys in the Dashboard.

Authentication to the API is performed by using the HTTP Header X-API-Key.

Body

application/json
title
string
required

Display title of the collection (required).

Maximum string length: 250
Example:

"Getting Started"

slug
string
required

URL-safe slug for the collection (required, lowercase alphanumeric with dashes/underscores).

Maximum string length: 250
Example:

"getting-started"

icon
string | null

Emoji icon identifier for the collection (optional).

Maximum string length: 25
Example:

"🚀"

description
string | null

Description of the collection content (optional).

Maximum string length: 1000
parent_id
integer | null

ID of the parent collection for nesting (optional, null for root-level).

seo_title
string | null

SEO-optimized title for search engines (optional, defaults to title).

Maximum string length: 250
seo_description
string | null

SEO-optimized description for search engines (optional).

Maximum string length: 1250

Response

Collection created successfully.

id
integer

Unique identifier for the collection.

parent_id
integer | null

ID of the parent collection.

title
string

Title of the collection.

slug
string

URL-safe slug.

description
string | null

Collection description.

seo_title
string

SEO-optimized title.

seo_description
string | null

SEO-optimized description.

icon
string | null

Emoji icon identifier.

created
string<date-time>

Creation timestamp.

last_updated
string<date-time>

Last update timestamp.

sort
integer

Sort order within parent.