Get Started

API Reference

Subroutes

Subroutes are first-class content sections within a project. Each subroute (e.g. docs, blog, tools) has its own configuration, navigation tree, and page collection.

Overview

A subroute defines:

  • Navigation — Declarative sidebar/tabs/anchors structure
  • Schema — Content validation rules for pages
  • Collection — Index page configuration

Endpoints

MethodPathDescription
POST/subroutesCreate subroute
GET/subroutesList subroutes
GET/subroutes/:slugGet subroute
PUT/subroutes/:slugUpdate subroute
DELETE/subroutes/:slugDelete subroute
GET/subroutes/:slug/pagesList pages

Subroute Object

JSON
{
  "id": "uuid",
  "project_id": "abc123",
  "slug": "docs",
  "name": "Documentation",
  "description": "Project documentation",
  "config": {
    "content_type": "markdown",
    "page_type": "docs",
    "navigation": { ... },
    "schema": { ... },
    "collection": { ... }
  },
  "created_at": "2026-03-20T00:00:00Z",
  "updated_at": "2026-03-20T00:00:00Z"
}
© 2026 PageGun. All rights reserved.