Core Concepts

Understand the key concepts behind PageGun before diving into the API.

Projects

A project is a container for your site. Each project has:

  • A unique ID
  • A name
  • An optional custom domain
  • Settings (theme, SEO defaults, analytics)
  • Pages (your content)

Most users have one project per site. You can have multiple projects under one account.

Pages

A page is a piece of content in your project. Every page has:

  • A type that determines its content format
  • A slug that defines its URL path
  • A subroute that groups related pages
  • A status: draft or published

Page Types

TypeContent FormatUse Case
pageJSON sections arrayLanding pages, marketing pages
articleMarkdownBlog posts, SEO content
docsMarkdown + nav treeDocumentation, help centers
itemStructured dataDirectory entries, listings

Page Types Reference →

Sections

Sections are the building blocks of page type pages. Each section is a JSON object with a type and type-specific props:

{ "config": { "sections": [ { "type": "hero", "heading": "Welcome", "ctaText": "Get Started" }, { "type": "features", "features": [...] }, { "type": "cta", "heading": "Ready?", "ctaText": "Sign Up" } ] } }

PageGun includes 14 section types: hero, problem, solution, features, how-it-works, FAQ, CTA, content, testimonials, pricing, directory hero, items grid, and articles grid.

Section Reference →

Subroutes

A subroute is the URL path prefix for a group of pages. Common subroutes:

SubrouteURL PatternTypical Use
pages/pages/aboutStatic pages
blog/blog/my-postBlog articles
docs/docs/quick-startDocumentation
tools/tools/my-toolDirectory items

You can use any string as a subroute. The final URL is: yourdomain.com/{subroute}/{slug}

Publishing

Pages start as drafts and become published when you call the publish endpoint:

Draft → Publish → Live on your domain
         ↓
       Update content → Re-publish → Updated live

Key points:

  • Editing a published page does not auto-update — you must re-publish
  • Publishing a docs page regenerates navigation for the entire docs tree
  • Unpublishing removes the page from your site but keeps the content

Hosting Modes

PageGun offers three ways to host your content:

ModeYou ManagePageGun Manages
Full HostContent onlyEverything else (hosting, SSL, CDN)
RewriteYour app + routingContent rendering
Data ModeEverythingEncrypted content storage

Hosting Modes →

API Keys

API keys authenticate your requests. Each key is scoped to your account and can access all projects.

  • Keys start with pgk_live_ (production) or pgk_test_ (sandbox)
  • Include in the Authorization: Bearer header
  • Never expose keys in client-side code

API Keys →

© 2026 PageGun. All rights reserved.