Skip to main content
PATCH
/
knowledge
/
collections
/
{id}
Update a collection
curl --request PATCH \
  --url https://api.getfernand.com/knowledge/collections/{id} \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "title": "<string>",
  "slug": "<string>",
  "icon": "<string>",
  "description": "<string>",
  "parent_id": 123,
  "seo_title": "<string>",
  "seo_description": "<string>",
  "sort": 123
}
'
{
  "id": 123,
  "parent_id": 123,
  "title": "Getting Started",
  "slug": "getting-started",
  "description": "Essential guides to help you get started with our platform",
  "seo_title": "Getting Started - Complete Guide",
  "seo_description": "<string>",
  "icon": "πŸš€",
  "get_icon_color": "<string>",
  "created": "2023-11-07T05:31:56Z",
  "last_updated": "2023-11-07T05:31:56Z",
  "get_articles": [
    12,
    45,
    67
  ],
  "get_collections": [
    3,
    8,
    15
  ],
  "sort": 2
}
Updates collection properties. When updating the sort order, provide only the β€˜sort’ field with the new zero-based position - this will reorder the collection within its parent and adjust neighboring collections automatically. When updating other fields, the slug uniqueness is validated if changed. Parent_id can be modified to move collections between parents or to root level.

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.

Path Parameters

id
integer
required

ID of the collection to update.

Body

application/json
title
string

Display title of the collection (optional).

Maximum string length: 250
slug
string

URL-safe slug (optional, lowercase alphanumeric with dashes/underscores).

Maximum string length: 250
icon
string | null

Emoji icon identifier (optional).

Maximum string length: 25
description
string | null

Collection description (optional).

Maximum string length: 1000
parent_id
integer | null

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

seo_title
string | null

SEO-optimized title (optional).

Maximum string length: 250
seo_description
string | null

SEO-optimized description (optional).

Maximum string length: 1250
sort
integer

New sort position (zero-based, optional). When provided, only updates sort order and ignores other fields.

Response

Collection updated successfully. Returns empty response when only sort was updated, otherwise returns the updated collection.

id
integer<int64>

Unique identifier for the collection.

parent_id
integer | null

ID of the parent collection for nested organization (null for root-level collections).

title
string

Display title of the collection shown in navigation and headers.

Maximum string length: 250
Example:

"Getting Started"

slug
string

URL-safe slug used in the collection's URL path.

Maximum string length: 250
Example:

"getting-started"

description
string | null

Description of the collection content and purpose.

Example:

"Essential guides to help you get started with our platform"

seo_title
string

SEO-optimized title for search engines and meta tags.

Maximum string length: 250
Example:

"Getting Started - Complete Guide"

seo_description
string | null

SEO-optimized description for search engines and social media previews.

Maximum string length: 250
icon
string | null

Emoji icon identifier displayed alongside the collection title for visual distinction.

Maximum string length: 25
Example:

"πŸš€"

get_icon_color
string | null

Computed color code associated with the emoji icon for theming purposes.

created
string<date-time>

Timestamp when the collection was created.

last_updated
string<date-time>

Timestamp when the collection was last modified.

get_articles
integer[]

Array of article IDs contained directly in this collection (not including nested collections).

Example:
[12, 45, 67]
get_collections
integer[]

Array of sub-collection IDs that are children of this collection.

Example:
[3, 8, 15]
sort
integer

Sort order within the parent collection or at root level.

Example:

2