Skip to main content
Static export is not publicly available. It is only available on Enterprise plans. Contact sales@mintlify.com to request access.
Use the static export API to programmatically pre-render your site into a self-contained set of static files and download the result as a single bundle. The exported bundle is pure HTML, CSS, and JavaScript with no runtime dependencies, so you can host it on any static file storage or CDN.

Page URLs in static bundles

Static exports use .html URLs that match the files in the bundle. For example, /guides/getting-started becomes /guides/getting-started.html. This happens automatically and requires no configuration.
Canonical and sitemap URLs stay extensionless. If your host doesn’t serve /guides/getting-started.html at /guides/getting-started, add a rewrite rule that maps extensionless paths to the matching .html file.

How static export works

A static export runs as an asynchronous job. You start the job for a project, then poll for its status until the bundle is ready to download.
1

Start a static export job

Call Start static export job with your project ID. The API queues the job and returns a jobId.A project can have only one active job at a time. If a job is already queued or running for the project, the endpoint returns 409. The endpoint is rate-limited to 10 job starts per organization per hour.
2

Poll the job and download the bundle

Poll Get static export job status with the jobId until status is completed. The completed response includes bundleUrl, a time-limited presigned S3 link to the bundle, along with sizeBytes and an expiresAt timestamp.Download the bundle before expiresAt. After it expires, call the status endpoint again to get a fresh bundleUrl. The underlying export files remain reusable. Only the link is time-limited.

Endpoints

Authentication

Authenticate requests with your admin API key. Generate an admin API key on the API keys page in your dashboard. Admin API keys begin with the mint_ prefix and are server-side secrets. Do not expose them in client-side code. Copy your project ID from the same page and use it as the projectId path parameter.

Host the bundle

The bundle is a .tar.gz archive. Extract it and upload the files to any static file host or CDN.
1

Download the bundle

Set BUNDLE_URL to the bundleUrl that Get static export job status returns, then download the archive before expiresAt.
2

Extract the archive

3

Upload the files to your host

Upload the contents of site to your static host or CDN. For example, to sync the files to an Amazon S3 bucket named in BUCKET_NAME:
If your host doesn’t serve extensionless URLs, add the rewrite rule described in Page URLs in static bundles.
To publish new content, start a new export job and repeat these steps, or automate them with a GitHub Action.

Automate with a GitHub Action

The following template workflow runs the full export loop on a schedule or on demand. It starts a job, polls until the export completes, downloads and extracts the bundle, then syncs the files to an S3 bucket.
.github/workflows/static-export.yml
Store your admin API key as the MINTLIFY_ADMIN_KEY repository secret, set PROJECT_ID to your project’s ID, and set BUCKET_NAME to your bucket. Before the sync step, add AWS credentials to the job, for example with the aws-actions/configure-aws-credentials action. To deploy to a different host, replace the sync step with that host’s upload command.