---
title: "启动静态导出任务"
method: POST
path: "/static-export/{projectId}/jobs"
language: "zh-Hans"
---

# 启动静态导出任务

`POST /static-export/{projectId}/jobs`

## Request

- Base URL: `https://api.mintlify.com/v1`
- URL: `https://api.mintlify.com/v1/static-export/{projectId}/jobs`
- Auth: HTTP bearer

<Warning>**静态导出未公开提供。** 仅适用于 Enterprise 套餐。请联系 [sales@mintlify.com](mailto:sales@mintlify.com) 申请访问权限。</Warning>

为部署启动一个静态导出任务。该任务会将你的文档预渲染为一组自包含的静态 HTML、RSC 及资源文件，然后将结果打包为单个可下载的归档文件。

每个部署同一时间只能有一个处于活动状态的静态导出任务。当已有任务处于 `queued` 或 `running` 状态时启动新任务，将返回 `409`。速率限制为每个组织每小时最多启动 10 个任务。

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

## Path parameters

- `projectId` string, required: 你的项目 ID。可以从控制台的 [API 密钥](https://app.mintlify.com/settings/organization/api-keys) 页面复制。

## Response `202`

导出任务已被接受并加入队列。

- StaticExportJob
  - `jobId` string, required: 静态导出任务的唯一标识符。
  - `status` 'queued' | 'running' | 'completed' | 'failed', required: 任务的当前状态。
  - `createdAt` string, date-time, required: 任务的创建时间。
  - `updatedAt` string, date-time, required: 任务上次状态变更的时间。
  - `error` string, nullable: 人类可读的错误消息。仅当 `status` 为 `failed` 时才会出现，否则为 `null`。
  - `bundleUrl` string, uri: 指向静态导出软件包归档的有时限预签名 S3 链接。仅当 `status` 为 `completed` 时才会出现。请在 `expiresAt` 之前下载该软件包。可再次调用此端点获取新的链接。
  - `sizeBytes` integer: 软件包大小（字节）。仅当 `status` 为 `completed` 时才会出现。
  - `expiresAt` string, date-time: 当前 `bundleUrl` 的过期时间。仅当 `status` 为 `completed` 时才会出现。

## Other responses

- `400`: 不支持该 `basePath` 值，或项目 ID 格式不正确。
- `401`: API 密钥缺失或无效、你的套餐不包含 API 访问权限，或该项目未启用静态导出。请联系 sales@mintlify.com 启用此功能。
- `403`: 你的 API 密钥没有写入权限，或你的请求来自不在该 API 密钥允许列表中的 IP 地址。
- `404`: 该项目不存在或不属于你的组织。
- `409`: 该部署已存在正在进行的静态导出任务。请等待当前任务完成后再启动新任务。
- `429`: 已超出速率限制。静态导出 API 允许每个组织每小时最多启动 10 个任务。
- `500`: 无法创建导出任务或将其加入队列。请重试该请求。如果错误仍然存在，请联系支持团队。

## Changes

- **2026-10-30** `bb14a66ad9fb`: 3 info
  - added the non-success response with the status `400`
  - added the non-success response with the status `404`
  - added the non-success response with the status `500`
- **2026-08-24** `53ae1296afae`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/mintlify/apis/mintlify-static-export-api/zh/changes/static-export/:projectId/jobs/post.md)

---

[API](https://skmtc.dev/mintlify/apis/mintlify-static-export-api/zh.md) - [All operations](https://skmtc.dev/mintlify/apis/mintlify-static-export-api/zh/llms.txt) - [OpenAPI document](https://skmtc.dev/mintlify/apis/mintlify-static-export-api/zh/revisions/bb14a66ad9fb?raw)
