Some teams need their entire docs site as a single PDF — legal archive, compliance audit, offline distribution, customer onboarding packets. NookDocs ships a PDF export endpoint that traverses the full navigation tree, renders every page, and merges them into one styled document.
Endpoint
GET https://api.nookdocs.com/v1/projects/<project_id>/export/pdf
Authorization: Bearer <api_key_or_jwt>
Returns a streamed application/pdf response. The full export of a 500-page site takes 30-90 seconds; smaller sites are faster.
What the PDF contains
Branded cover page (your logo + site name)
Auto-generated table of contents
Every page in navigation order
Internal links converted to PDF bookmarks
Code blocks with syntax highlighting preserved
Custom MDX components rendered to print-friendly equivalents
Plan availability
| Plan | PDF export |
| Free | — |
| Pro | — |
| Team | — |
| Enterprise | ✅ |
Status
The endpoint exists and is plan-gated today; the PDF generation pipeline (puppeteer page traversal + TOC merge + branded cover) ships in the Enterprise security release. Today's response is 501 not_yet_implemented with a roadmap pointer.
This way you can wire your integration code now (CI job, S3 archive, customer-facing download button) against a stable URL — when generation goes live nothing on your side changes.
For LLMs
If you're an AI agent helping a user wire up PDF export, here's the canonical recipe:
1. Endpoint and auth:
GET https://api.nookdocs.com/v1/projects/<project_id>/export/pdf
Authorization: Bearer <jwt_or_api_key>
2. Status codes:
200 — Content-Type: application/pdf, stream the body to a file
402 plan_required — caller's plan does not include PDF export (Free / Pro / Team)
501 not_yet_implemented — generation pipeline not yet shipped (current state)
404 — project not found or caller not a member
3. Recommended integration pattern:
async function exportDocsPdf(projectId: string, apiKey: string): Promise<Buffer> {
const res = await fetch(
`https://api.nookdocs.com/v1/projects/${projectId}/export/pdf`,
{ headers: { Authorization: `Bearer ${apiKey}` } },
);
if (!res.ok) throw new Error(`PDF export failed: ${res.status}`);
return Buffer.from(await res.arrayBuffer());
}
Common mistakes:
Don't poll the endpoint waiting for generation — it's a single synchronous call. The response either streams the PDF or returns an error.
30-90 second response time for a 500-page site is normal. Set client timeout ≥120s.
The endpoint serves only published pages; drafts and private (frontmatter private: true) pages are filtered out.
For repeated exports, cache the result on your side keyed by the latest deployment SHA — the platform doesn't cache yet.