Get Started

API Reference

Project Settings

Manage project-level configuration including navigation, branding, and site routes.

Get Settings

HTTP
GET /v1/projects/:id/settings

Request

Terminal
curl https://api.pagegun.com/v1/projects/PROJECT_ID/settings \
  -H "Authorization: Bearer pgk_live_xxx"

Response

JSON
{
  "success": true,
  "data": {
    "docs_nav": [
      { "title": "Getting Started", "slug": "quick-start" },
      { "title": "API Reference", "children": [
        { "title": "Authentication", "slug": "api-reference/authentication" },
        { "title": "Pages", "slug": "api-reference/pages" }
      ]}
    ],
    "shared_header": {
      "logo": "https://example.com/logo.svg",
      "links": [
        { "label": "Docs", "href": "/docs" },
        { "label": "Blog", "href": "/blog" }
      ]
    },
    "shared_footer": {
      "links": [],
      "copyright": "© 2025 Example Inc."
    },
    "branding": {
      "primary_color": "#6366f1",
      "font": "Inter"
    },
    "site_routes": {
      "docs": "/docs",
      "blog": "/blog"
    },
    "data_mode": {
      "enabled": true,
      "content_key": "base64-encoded-key"
    }
  }
}

Update Settings

HTTP
PUT /v1/projects/:id/settings

Settings are merged — only the fields you include are updated. Omitted fields are left unchanged.

Request

Terminal
curl -X PUT https://api.pagegun.com/v1/projects/PROJECT_ID/settings \
  -H "Authorization: Bearer pgk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "branding": {
      "primary_color": "#8b5cf6"
    }
  }'

Response

JSON
{
  "success": true,
  "data": {
    "branding": {
      "primary_color": "#8b5cf6",
      "font": "Inter"
    }
  }
}

Common Settings Fields

docs_nav

Controls the sidebar navigation for documentation pages. Supports nested groups:

JSON
{
  "docs_nav": [
    { "title": "Introduction", "slug": "introduction" },
    {
      "title": "Guides",
      "children": [
        { "title": "Data Mode", "slug": "guides/data-mode" },
        { "title": "Custom Domains", "slug": "guides/custom-domains" }
      ]
    }
  ]
}

shared_header

Site-wide header configuration:

JSON
{
  "shared_header": {
    "logo": "https://example.com/logo.svg",
    "links": [
      { "label": "Docs", "href": "/docs" },
      { "label": "GitHub", "href": "https://github.com/example", "external": true }
    ]
  }
}

Site-wide footer configuration with link groups and copyright text.

branding

Visual customization: colors, fonts, and theme settings.

site_routes

Maps subroutes to URL paths. Controls how subroutes appear in the site structure.

© 2026 PageGun. All rights reserved.