Skip to content
nexdoc.design Docs

Export and publish

Download HTML ZIP or PDF, and optionally publish a public URL.

Preview in the viewer first (viewer_url). The viewer includes floating Download PDF / HTML and Publish controls.

Export (standard download)

code
curl -sS -X POST "$NXD_API_URL/v1/jobs/$JOB/export" \
  -H "Authorization: Bearer $NXD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"format":"html"}' | jq
formatResultPrefer when
htmlZIP of the static site (index.html + assets)landing-page, portfolio, link-in-bio, email-newsletter, dashboard
pdfSingle PDFPrint docs, slides, cards, resumes, invoices

Optional run_id selects a historical run; default is the job’s current commit.

code
{
  "job_id": "job_...",
  "format": "pdf",
  "run_id": "run_...",
  "commit_hash": "...",
  "download_url": "https://...",
  "expires_at": "2026-09-03T01:00:00Z"
}

download_url is short-lived (~1 hour). Download promptly.

Publish (opt-in)

Only when you explicitly want a stable public URL — not required for preview or download.

code
curl -sS -X POST "$NXD_API_URL/v1/jobs/$JOB/publish" \
  -H "Authorization: Bearer $NXD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}' | jq
code
{
  "public_url": "https://pub.nexdoc.design/...",
  "run_id": "run_...",
  "commit_hash": "..."
}

Pass {"run_id":"..."} to publish a specific version. Editing chrome is stripped for the public site.

Unpublish

code
curl -sS -X POST "$NXD_API_URL/v1/jobs/$JOB/unpublish" \
  -H "Authorization: Bearer $NXD_API_KEY" | jq
# → { "job_id", "unpublished": true }

Viewer session

For a fresh preview link without exporting:

code
curl -sS "$NXD_API_URL/v1/jobs/$JOB/viewer/session" \
  -H "Authorization: Bearer $NXD_API_KEY" | jq
# → { "viewer_url", "expires_at" }

Completed runs also include viewer_url on the run payload. Preview links last 24 hours; remint with this endpoint anytime. The design is not gone when a link expires.