Skip to main content
POST
/
static-export
/
jobs
Start static export job
curl --request POST \
  --url https://api.mintlify.com/v1/static-export/jobs \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "domain": "docs.example.com",
  "version": "2024-06-01",
  "paths": [
    "index",
    "guides/getting-started",
    "api-reference/introduction"
  ]
}
'
import requests

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

payload = {
"domain": "docs.example.com",
"version": "2024-06-01",
"paths": ["index", "guides/getting-started", "api-reference/introduction"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
domain: 'docs.example.com',
version: '2024-06-01',
paths: ['index', 'guides/getting-started', 'api-reference/introduction']
})
};

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

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mintlify.com/v1/static-export/jobs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'domain' => 'docs.example.com',
'version' => '2024-06-01',
'paths' => [
'index',
'guides/getting-started',
'api-reference/introduction'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

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

curl_close($curl);

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

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

func main() {

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

payload := strings.NewReader("{\n \"domain\": \"docs.example.com\",\n \"version\": \"2024-06-01\",\n \"paths\": [\n \"index\",\n \"guides/getting-started\",\n \"api-reference/introduction\"\n ]\n}")

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

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.mintlify.com/v1/static-export/jobs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"domain\": \"docs.example.com\",\n \"version\": \"2024-06-01\",\n \"paths\": [\n \"index\",\n \"guides/getting-started\",\n \"api-reference/introduction\"\n ]\n}")
.asString();
require 'uri'
require 'net/http'

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

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"domain\": \"docs.example.com\",\n \"version\": \"2024-06-01\",\n \"paths\": [\n \"index\",\n \"guides/getting-started\",\n \"api-reference/introduction\"\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "jobId": "se_3f9a2c1b8e7d4a06",
  "status": "running",
  "progress": 42,
  "pageCount": 128,
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "error": "<string>"
}
{
"error": "<string>"
}
{
"error": "<string>"
}
{
"error": "<string>"
}
Static export requires an Enterprise plan.
The domain field is the hostname where your documentation is served — the custom domain configured for your project in the Mintlify dashboard (for example, docs.example.com), or your Mintlify subdomain (for example, acme.mintlify.app) if you haven’t set a custom domain. Pass the hostname only, without the protocol or any path prefix.

Authorizations

Authorization
string
header
required

Admin API key. Generate one on the API keys page in your dashboard.

Body

application/json
domain
string
required

The primary domain of the deployment to export. Use the custom domain configured for your project in the Mintlify dashboard (for example, docs.example.com). If you haven't configured a custom domain, use your Mintlify subdomain (for example, acme.mintlify.app). Provide the hostname only — do not include the protocol, a trailing slash, or a path prefix such as /docs.

Example:

"docs.example.com"

version
string

An optional version label to tag this export. Defaults to the latest published version.

Example:

"2024-06-01"

paths
string[]

An optional list of page paths to include. When omitted, every published page is exported.

Example:
[
"index",
"guides/getting-started",
"api-reference/introduction"
]

Response

The export job was accepted and queued.

jobId
string
required

Unique identifier for the static export job.

Example:

"se_3f9a2c1b8e7d4a06"

status
enum<string>
required

The current state of the job.

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

"running"

progress
number
required

Completion percentage from 0 to 100.

Required range: 0 <= x <= 100
Example:

42

pageCount
integer
required

The number of pages exported so far.

Example:

128

createdAt
string<date-time>
required

When the job was created.

updatedAt
string<date-time>
required

When the job was last updated.

error
string | null

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