Skip to main content
PATCH
/
knowledge
/
articles
/
{id}
/
collections
Update the position of an article
curl --request PATCH \
  --url https://api.getfernand.com/knowledge/articles/{id}/collections \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "sort": 2,
  "collection_id": 123
}
'
[
  {
    "article_id": 123,
    "collection_id": 123,
    "sort": 2
  }
]
Changes the display order of an article within a specific collection. The article maintains its position in other collections it belongs to. Provide the zero-based sort position and the collection_id (or null for root). The endpoint automatically adjusts the sort order of surrounding articles to maintain sequence integrity. This is collection-scoped - it reorders the article within one collection, not across all collections the article belongs to.

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 article to reorder.

Body

application/json
sort
integer
required

New zero-based sort position within the collection (required).

Example:

2

collection_id
integer | null
required

ID of the collection to reorder within (required, null for root level).

Response

Article sort order updated successfully.

article_id
integer<int64>

ID of the article in this relationship.

collection_id
integer | null

ID of the collection containing the article (null for root-level placement).

sort
integer

Zero-based sort position of the article within the collection.

Example:

2