Skip to main content
Mintlify
current

Search documentation

Type to search this documentation.

Start static export job

Start a static export job for a deployment. The job pre-renders your documentation into a self-contained set of static HTML, RSC, and asset files, then packages the result as a single downloadable archive.

A deployment can have only one active static export job at a time. Starting a job while another is queued or running returns 409. Rate-limited to 10 job starts per organization per hour.

Static export is available on Enterprise plans.

Authenticate with an admin API key.

Related topics

POST /static-export/{projectId}/jobs

cURL
curl --request POST \
  --url https://api.mintlify.com/v1/static-export/{projectId}/jobs \
  --header 'Authorization: Bearer <token>'
Python
import requests

url = "https://api.mintlify.com/v1/static-export/{projectId}/jobs"

headers = {
    "Authorization": "Bearer <token>"
}

response = requests.post(url, headers=headers)

print(response.text)
JavaScript
const options = {method: "POST", headers: {"Authorization": "Bearer <token>"}};

fetch("https://api.mintlify.com/v1/static-export/{projectId}/jobs", options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
PHP
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.mintlify.com/v1/static-export/{projectId}/jobs",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
Go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.mintlify.com/v1/static-export/{projectId}/jobs"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
Java
HttpResponse<String> response = Unirest.post("https://api.mintlify.com/v1/static-export/{projectId}/jobs")
  .header("Authorization", "Bearer <token>")
  .asString();
Ruby
require 'uri'
require 'net/http'

url = URI("https://api.mintlify.com/v1/static-export/{projectId}/jobs")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
202
{
  "jobId": "6520f3a1c9b1a20012ab34cd",
  "status": "completed",
  "createdAt": "<string>",
  "updatedAt": "<string>",
  "error": "<string>",
  "bundleUrl": "https://mintlify-static-export-outputs-prod.s3.amazonaws.com/6520f3a1c9b1a20012ab34cd/export.zip?X-Amz-Signature=...",
  "sizeBytes": 18432000,
  "expiresAt": "<string>"
}
401
{
  "error": "<string>"
}
403
{
  "error": "<string>"
}
409
{
  "error": "<string>"
}
429
{
  "error": "<string>"
}
Authorizationstringrequired

The Authorization header expects a Bearer token. Use an admin API key. This is a server-side secret key. Generate one on the API keys page in your dashboard.

projectIdstringrequired

202 — The export job was accepted and queued.

jobIdstringrequired

Unique identifier for the static export job.

Example: 6520f3a1c9b1a20012ab34cd

Typestring
statusenum<string>required

The current state of the job.

Available options: queued, running, completed, failed. Example: completed

Typeenum<string>
createdAtstringrequired

When the job was created.

Typestring
updatedAtstringrequired

When the job last transitioned state.

Typestring
error?string | null

A human-readable error message. Present only when status is failed, otherwise null.

Typestring | null
bundleUrl?string

A time-limited presigned S3 link to the static export bundle archive. Present only when status is completed. Download the bundle before expiresAt. Call this endpoint again to get a fresh link.

Example: https://mintlify-static-export-outputs-prod.s3.amazonaws.com/6520f3a1c9b1a20012ab34cd/export.zip?X-Amz-Signature=...

Typestring
sizeBytes?integer

The size of the bundle in bytes. Present only when status is completed.

Example: 18432000

Typeinteger
expiresAt?string

When the current bundleUrl expires. Present only when status is completed.

Typestring
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu