Introduction
PageGun is an API-first site builder designed for developers and AI agents. Create landing pages, blogs, documentation sites, and directories — all through a REST API.
Why PageGun?
Traditional page builders are built for humans clicking buttons. PageGun is different:
- API-first — Every feature is accessible via REST API
- AI-native — Designed from the ground up for AI agents to create and manage content
- Structured data — Pages are JSON configs, not opaque WYSIWYG blobs
- Instant publishing — Create a page and go live with two API calls
What You Can Build
| Use Case | Page Type | Example |
|---|---|---|
| Landing pages | page | Product launches, marketing pages |
| Blog / SEO content | article | Blog posts, tutorials, guides |
| Developer docs | docs | API docs, knowledge bases, help centers |
| Tool directories | item + page | SaaS directories, resource libraries |
How It Works
1. Create a project → Your site container
2. Add pages → Landing pages, articles, docs, items
3. Publish → Go live on your domainEvery step is an API call. No dashboard required (though one is available).
Quick Example
Create and publish a blog post in two API calls:
# Create an article
curl -X POST "https://api.pagegun.com/pages" \
-H "Authorization: Bearer $PAGEGUN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"page_name": "Hello World",
"slug": "hello-world",
"subroute": "blog",
"type": "article",
"project_id": "your_project_id",
"markdown_content": "# Hello World\n\nMy first PageGun post."
}'
# Publish it
curl -X POST "https://api.pagegun.com/pages/PAGE_ID/publish" \
-H "Authorization: Bearer $PAGEGUN_API_KEY"That's it. Your article is live.
Hosting Options
PageGun offers three hosting modes:
| Mode | Description | Best For |
|---|---|---|
| Full Host | PageGun hosts your entire site | New sites, landing pages |
| Rewrite | Embed PageGun pages in your existing site | Adding blog/docs to your app |
| Data Mode | Encrypted headless CMS on CDN | Custom frontends, full control |
Learn more about hosting modes →
Next Steps
- Quick Start — Publish your first page in 5 minutes
- Page Types — Understand the 4 page types
- API Reference — Full endpoint documentation
- Guides — Step-by-step tutorials