# 启动静态导出作业 (/zh/api/static-export/start-job)

<!-- agent-signals: reading_time_min: 1 · est_tokens: 1093 · updated: 2026-07-30 -->
Related: [获取静态导出作业状态](/zh/api/static-export/get-job-status.md), [生成导出包](/zh/api/static-export/generate-bundle.md), [获取 AI 助手调用方统计](/zh/api/analytics/assistant-caller-stats.md)

<Info>
  静态导出需要 [Enterprise 套餐](https://mintlify.com/pricing?ref=static-export)。
</Info>

`POST /static-export/jobs`

为部署启动一个静态导出任务。该任务会将你的文档预渲染为一组自包含的静态 HTML、RSC 及资源文件。返回一个任务 ID，可用于轮询状态；任务完成后，还可用它生成可下载的软件包。

静态导出仅适用于 Enterprise 套餐。

使用管理员 API 密钥进行身份验证。

## OpenAPI

```json
{
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "required": [
            "domain"
          ],
          "properties": {
            "domain": {
              "type": "string",
              "description": "要导出的部署的主域名。使用你在 Mintlify 控制台中为项目配置的自定义域名（例如 `docs.example.com`）。如果尚未配置自定义域名，则使用你的 Mintlify 子域名（例如 `acme.mintlify.app`）。仅提供主机名——不要包含协议、结尾斜杠或诸如 `/docs` 之类的路径前缀。",
              "example": "docs.example.com"
            },
            "version": {
              "type": "string",
              "description": "用于标记此次导出的可选版本标签。默认为最新发布的版本。",
              "example": "2024-06-01"
            },
            "paths": {
              "type": "array",
              "description": "要包含的页面路径的可选列表。省略时，将导出所有已发布的页面。",
              "items": {
                "type": "string"
              },
              "example": [
                "index",
                "guides/getting-started",
                "api-reference/introduction"
              ]
            }
          }
        }
      }
    }
  },
  "responses": {
    "202": {
      "description": "导出任务已被接受并加入队列。",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "jobId",
              "status",
              "progress",
              "pageCount",
              "createdAt",
              "updatedAt"
            ],
            "properties": {
              "jobId": {
                "type": "string",
                "description": "静态导出任务的唯一标识符。",
                "example": "se_3f9a2c1b8e7d4a06"
              },
              "status": {
                "type": "string",
                "description": "任务的当前状态。",
                "enum": [
                  "queued",
                  "running",
                  "completed",
                  "failed"
                ],
                "example": "running"
              },
              "progress": {
                "type": "number",
                "description": "完成百分比，范围为 0 到 100。",
                "minimum": 0,
                "maximum": 100,
                "example": 42
              },
              "pageCount": {
                "type": "integer",
                "description": "目前已导出的页面数量。",
                "example": 128
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "description": "任务的创建时间。"
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time",
                "description": "任务的最后更新时间。"
              },
              "error": {
                "type": "string",
                "description": "人类可读的错误消息。仅当 `status` 为 `failed` 时才会出现。",
                "nullable": true
              }
            }
          }
        }
      }
    },
    "400": {
      "description": "请求体无效。请检查 `domain` 是否为可访问的主机名，并确认 `paths` 中的条目是有效的页面路径。",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "description": "人类可读的错误描述。"
              }
            }
          }
        }
      }
    },
    "401": {
      "description": "身份验证失败。",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "description": "人类可读的错误描述。"
              }
            }
          }
        }
      }
    },
    "403": {
      "description": "该组织未启用静态导出。请联系销售团队在 Enterprise 套餐上启用此功能。",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "description": "人类可读的错误描述。"
              }
            }
          }
        }
      }
    }
  }
}
```
