Get Project

Retrieve a single project by ID with complete configuration details, including settings, hosting configuration, and statistics.

Endpoint

GET /projects/:id

Path Parameters

NameTypeRequiredDescription
idstringYesUnique project identifier (e.g., proj_abc123)

Query Parameters

NameTypeRequiredDescription
includestringNoComma-separated list of additional data to include: pages, settings, stats

Headers

NameRequiredDescription
AuthorizationYesBearer $PAGEGUN_API_KEY
Content-TypeNoapplication/json

Response

Returns a project object with complete configuration details.

{ "data": { "id": "proj_abc123", "name": "My Website", "slug": "my-website", "domain": "mywebsite.com", "status": "active", "hosting_mode": "full_host", "page_count": 12, "settings": { "theme": "default", "favicon": "https://example.com/favicon.ico", "logo": "https://example.com/logo.png", "custom_css": "", "google_analytics": "GA-XXXXXXXX-X", "meta_description": "My awesome website built with PageGun", "social_image": "https://example.com/og-image.png" }, "hosting": { "mode": "full_host", "subdomain": "mywebsite", "custom_domain": "mywebsite.com", "ssl_enabled": true, "cdn_enabled": true }, "created_at": "2024-01-15T10:30:00Z", "updated_at": "2024-01-20T14:00:00Z" } }

Response Fields

Project Object

FieldTypeDescription
idstringUnique identifier for the project
namestringDisplay name of the project
slugstringURL-friendly version of the project name
domainstringCustom domain for the project (if configured)
statusstringCurrent status: active, archived, or suspended
hosting_modestringHosting configuration: full_host, rewrite, or data_mode
page_countintegerTotal number of pages in this project
settingsobjectProject configuration settings
hostingobjectHosting and domain configuration
created_atstringISO 8601 timestamp when project was created
updated_atstringISO 8601 timestamp when project was last modified

Settings Object

FieldTypeDescription
themestringVisual theme identifier
faviconstringURL to the favicon image
logostringURL to the logo image
custom_cssstringCustom CSS styles for the project
google_analyticsstringGoogle Analytics tracking ID
meta_descriptionstringDefault meta description for SEO
social_imagestringDefault social sharing image URL

Hosting Object

FieldTypeDescription
modestringHosting mode: full_host, rewrite, or data_mode
subdomainstringPageGun subdomain (e.g., mysite for mysite.pagegun.dev)
custom_domainstringCustom domain if configured
ssl_enabledbooleanWhether SSL certificate is active
cdn_enabledbooleanWhether CDN acceleration is enabled

Examples

Basic Request

curl -X GET "https://api.pagegun.com/projects/proj_abc123" \ -H "Authorization: Bearer $PAGEGUN_API_KEY"

Include Additional Data

curl -X GET "https://api.pagegun.com/projects/proj_abc123?include=pages,stats" \ -H "Authorization: Bearer $PAGEGUN_API_KEY"

With JavaScript

const response = await fetch('https://api.pagegun.com/projects/proj_abc123', { headers: { 'Authorization': `Bearer ${process.env.PAGEGUN_API_KEY}` } }); const project = await response.json(); console.log(project.data.name);

Error Responses

401 Unauthorized

{ "statusCode": 401, "name": "unauthorized", "message": "Invalid or missing API key" }

403 Forbidden

{ "statusCode": 403, "name": "forbidden", "message": "You don't have access to this project" }

404 Not Found

{ "statusCode": 404, "name": "not_found", "message": "Project not found" }

429 Too Many Requests

{ "statusCode": 429, "name": "rate_limit_exceeded", "message": "Too many requests. Please try again later." }
© 2026 PageGun. All rights reserved.