Fetching the KB structure
The knowledge base structure endpoint gives you a complete overview of your help center in a single call. It returns all articles and collections, along with metadata and a base URL you can use to build canonical links. This is the starting point if you want to render navigation, display content, or sync your KB into another system.
Endpoint
GET /knowledge/structureAuthentication
You must include your API key in the X-Api-Key header. Without it, the request will fail with a 401 Unauthorized error.
curl -H "X-Api-Key: sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \ https://api.getfernand.com/knowledge/structureResponse
The response includes three top-level keys:
articles
an object where each key is an article ID and the value is the article metadatacollections
an object where each key is a collection ID and the value is the collection metadatabase_url
the canonical base URL for linking to your knowledge base
Article fields
Each article entry contains:
id: numeric identifieruuid: globally unique identifiertitle: article titleseo_title: SEO-friendly titleslug: URL slugdescription: optional descriptioncreatedandlast_updated: ISO 8601 timestampspublished: boolean indicating visibility
Collection fields
Each collection entry contains:
id: numeric identifiertitle: collection nameslug: URL slugdescription: optional descriptionparent_id: ID of the parent collection if nestedarticles: array of article IDs belonging to the collectionsort: integer used for ordering
Example
Here’s a trimmed-down example of the structure response (with placeholder values for clarity):
{ "articles":
{ "101":
{ "id": 101,
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"title": "Sample article",
"slug": "sample-article",
"seo_title": "Sample article",
"description": "A sample article",
"created": "2023-01-01T10:00:00Z",
"last_updated": "2023-01-10T12:00:00Z",
"published": true }
},
"collections": {
"10":
{ "id": 10,
"title": "Getting started",
"slug": "getting-started",
"description": "Introductory guides",
"parent_id": null,
"articles": [101],
"sort": 1 }
},
"base_url": "https://help.yourdomain.com"}Next steps
After fetching the structure, you can load individual articles with GET /knowledge/articles/{id} or update them with OPTIONS /knowledge/articles/{id}.

