Quick Start

Get up and running with PageGun in under 5 minutes. Build your first page programmatically.

Prerequisites

Before you start, you'll need:

1. Get Your API Key

  1. Log in to your PageGun dashboard
  2. Go to Settings → API Keys
  3. Click Create New Key
  4. 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

🎨 Master Page Sections

🤖 Automate with AI

🔧 Advanced Features

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! 🚀

© 2026 PageGun. All rights reserved.