Private API
The Private API grants full read access from any environment when authenticated with an API token. Use it for server-side jobs, build pipelines, or integrations that cannot rely on browser-origin protection.
For a deeper overview of how the API layers fit together, visit the main documentation page.
Key characteristics
- Token-protected: include a Bearer token generated in the dashboard
- Server-friendly: ideal for backend jobs, build pipelines, and custom tooling
- Unrestricted origins: requests can originate from any network location
- Full access: retrieve both published and unpublished data within the token's project scope
API tokens
Creating a token
- Navigate to Dashboard → API Tokens
- Click Create New Token
- Name the token and select the project it can access
- Copy the token immediately; it is shown only once
Each token is scoped to a single project. Create multiple tokens for multi-project access.
Using a token
Include the token in the Authorization header:
curl -H "Authorization: Bearer YOUR_TOKEN_HERE" \ https://pagoti.com/api/v1/projects
Security warning
Never embed API tokens in client-side code or public repositories. Compromised tokens allow others to read all content, exhaust rate limits, and force you to rotate credentials, and in the future manipulate your content. Stick to the Public API for browser-based use cases.
Base URL
https://pagoti.com/api/v1
Endpoints
List projects
GET /api/v1/projects
Returns projects accessible to the authenticated token.
Response:
{
"data": [
{
"hash_id": "abc123",
"name": "My Blog",
"slug": "my-blog",
"description": "My personal blog",
"published": true,
"published_at": "2025-01-15T10:00:00.000000Z",
"public": true,
"public_at": "2025-01-15T10:00:00.000000Z",
"updated_at": "2025-01-15T10:00:00.000000Z",
"pages_count": 5,
"media_count": 12,
"pages_limit": 100,
"media_limit": 1000,
"can_create_page": true,
"can_create_media": true
}
],
"links": {},
"meta": {}
}
Get project details
GET /api/v1/projects/{project}
Returns metadata for the specified project.
Response:
{
"data": {
"hash_id": "abc123",
"name": "My Blog",
"slug": "my-blog",
"description": "My personal blog",
"published": true,
"published_at": "2025-01-15T10:00:00.000000Z",
"public": true,
"public_at": "2025-01-15T10:00:00.000000Z",
"updated_at": "2025-01-15T10:00:00.000000Z",
"pages_count": 5,
"media_count": 12,
"pages_limit": 100,
"media_limit": 1000,
"can_create_page": true,
"can_create_media": true
}
}
List project pages
GET /api/v1/projects/{project}/pages
Includes unpublished pages when the token has permission.
Get page details
GET /api/v1/projects/{project}/pages/{page}
Returns full page details including content.
List project media
GET /api/v1/projects/{project}/media
Returns the media library for the project.
Example usage
const projectsResponse = await fetch('https://pagoti.com/api/v1/projects', {
headers: {
Authorization: 'Bearer YOUR_TOKEN_HERE'
}
});
const projects = await projectsResponse.json();
const pagesResponse = await fetch(
`https://pagoti.com/api/v1/projects/${projects.data[0].hash_id}/pages`,
{
headers: {
Authorization: 'Bearer YOUR_TOKEN_HERE'
}
}
);
const pages = await pagesResponse.json();
Token limits
Token counts are tied to your subscription tier. Refer to the billing page for your current allowance.