Quick Start
Get up and running with PageGun in under 5 minutes. Build your first page programmatically.
Prerequisites
Before you start, you'll need:
- Create a PageGun account (free)
- Get your API key
- Create your first project (or use the default one)
1. Get Your API Key
- Log in to your PageGun dashboard
- Go to Settings → API Keys
- Click Create New Key
- Copy your key (starts with
pgk_live_)
⚠️ Store your key securely — you won't see it again.
2. Create Your First Page
Let's create a simple landing page. You can copy and paste this into your terminal:
# Set your API key (replace with your actual key)
export PAGEGUN_API_KEY="pgk_live_your_key_here"
# Create a landing page
curl -X POST "https://api.pagegun.com/pages" \
-H "Authorization: Bearer $PAGEGUN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"page_name": "My First Page",
"slug": "hello-world",
"subroute": "pages",
"type": "page",
"project_id": "your_project_id",
"description": "My first PageGun page built with the API",
"config": {
"theme": "default",
"sections": [
{
"type": "hero",
"heading": "Hello, PageGun!",
"description": "I just built this page using the PageGun API. Pretty cool, right?",
"ctaText": "Learn More",
"ctaHref": "https://docs.pagegun.com"
},
{
"type": "features",
"heading": "What I Can Build",
"features": [
{
"title": "Landing Pages",
"content": "Convert visitors with optimized landing pages",
"icon": "Rocket"
},
{
"title": "Blog Articles",
"content": "Publish SEO-optimized content in Markdown",
"icon": "Edit"
},
{
"title": "Documentation",
"content": "Create searchable docs with navigation",
"icon": "Book"
}
]
}
]
}
}'Response:
{
"data": {
"id": "page_xyz789",
"page_name": "My First Page",
"slug": "hello-world",
"type": "page",
"status": "draft",
"url": "https://yourproject.pagegun.io/pages/hello-world",
"created_at": "2024-01-15T10:30:00Z"
}
}3. Publish Your Page
Make your page live with a simple publish request:
# Use the page ID from the previous response
curl -X POST "https://api.pagegun.com/pages/page_xyz789/publish" \
-H "Authorization: Bearer $PAGEGUN_API_KEY"4. View Your Page
🎉 Congratulations! Your page is now live at the URL returned in the response.
Visit https://yourproject.pagegun.io/pages/hello-world to see your creation.
Next Steps
Now that you've created your first page, explore what else you can build:
📄 Build More Page Types
- Create a blog article — Write in Markdown
- Build a docs site — With navigation and search
- Create item directories — Product catalogs, tool lists
🎨 Master Page Sections
- Hero sections — Powerful first impressions
- Features grid — Showcase capabilities
- Testimonials — Build social proof
- FAQ section — Answer common questions
🤖 Automate with AI
- Use with AI agents — Let AI create content
- Webhooks integration — React to page changes
- Bulk operations — Manage many pages
🔧 Advanced Features
- Custom domains — Use your own domain
- SEO optimization — Meta tags and sitemaps
- Analytics tracking — Google Analytics, etc.
Need Help?
- 📚 Browse our guides for step-by-step tutorials
- 🔍 Check the API reference for detailed parameters
- 💬 Join our community for support and tips
Happy building! 🚀