Get Project Settings
Retrieve the current settings for a project, including theme, SEO defaults, custom domain configuration, and feature flags.
Endpoint
GET /projects/:id/settings
Path Parameters
| Name | Type | Required | Description |
|---|
id | string | Yes | The project ID |
| Name | Required | Description |
|---|
Authorization | Yes | Bearer $PAGEGUN_API_KEY |
Response
{
"data": {
"project_id": "proj_abc123",
"theme": "default",
"custom_domain": "docs.example.com",
"favicon_url": "https://example.com/favicon.ico",
"og_image_url": "https://example.com/og.jpg",
"meta_title": "Example Docs",
"meta_description": "Documentation for Example API",
"google_analytics_id": "G-XXXXXXXXXX",
"custom_head_html": "<script>...</script>",
"footer_text": "© 2024 Example Inc.",
"nav_links": [
{ "label": "Home", "href": "https://example.com" },
{ "label": "GitHub", "href": "https://github.com/example" }
],
"data_mode": {
"enabled": false,
"cdn_base": null
},
"hosting_mode": "rewrite"
}
}
Settings Fields
| Field | Type | Description |
|---|
project_id | string | The project this settings belongs to |
theme | string | Visual theme ("default", "dark", "minimal") |
custom_domain | string | null | Custom domain if configured |
favicon_url | string | null | Favicon URL |
og_image_url | string | null | Default Open Graph image for all pages |
meta_title | string | null | Default meta title |
meta_description | string | null | Default meta description |
google_analytics_id | string | null | Google Analytics measurement ID |
custom_head_html | string | null | Custom HTML injected into <head> |
footer_text | string | null | Footer text displayed on all pages |
nav_links | array | Navigation links in the header |
data_mode | object | Data Mode configuration |
data_mode.enabled | boolean | Whether Data Mode is active |
data_mode.cdn_base | string | null | CDN base URL when Data Mode is enabled |
hosting_mode | string | Current hosting mode: "fullhost", "rewrite", or "data" |
Example
curl -s "https://api.pagegun.com/projects/proj_abc123/settings" \
-H "Authorization: Bearer $PAGEGUN_API_KEY" | jq
JavaScript
const response = await fetch(
'https://api.pagegun.com/projects/proj_abc123/settings',
{ headers: { 'Authorization': `Bearer ${apiKey}` } }
);
const { data } = await response.json();
console.log(`Theme: ${data.theme}`);
console.log(`Domain: ${data.custom_domain}`);
console.log(`Data Mode: ${data.data_mode.enabled ? 'ON' : 'OFF'}`);