---
title: "触发自动化"
method: POST
path: "/workflow/{projectId}/{workflowSchemaId}/trigger"
language: "zh-Hans"
---

# 触发自动化

`POST /workflow/{projectId}/{workflowSchemaId}/trigger`

## Request

- Base URL: `https://api.mintlify.com/v1`
- URL: `https://api.mintlify.com/v1/workflow/{projectId}/{workflowSchemaId}/trigger`
- Auth: HTTP bearer

立即触发计划自动化运行，而无需等待其下一次预定时间。适合从 CI/CD 流水线中运行自动化，例如在每次合并到默认分支时运行的 GitHub Action。仅支持触发计划（自定义计划）自动化。该次运行会处理自上次完成运行以来的变更，与常规计划运行完全相同。

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

## Path parameters

- `projectId` string, required
- `workflowSchemaId` string, required

## Response `202`

自动化运行已成功加入队列。

- object
  - `schemaId` string: 被触发的自动化的 ID。
  - `instanceId` string: 已入队自动化运行的 ID。会出现在 [Automations](https://app.mintlify.com/settings/project/automations?tab=runs) 设置的 **Runs** 选项卡中。
  - `jobId` string: 处理此次运行的后台任务 ID。

## Other responses

- `400`: 无效请求。自动化 ID 格式错误、自动化未激活，或该自动化未配置为使用自定义计划。
- `401`: API 密钥缺失或无效，或者你的方案不包含 API 访问权限或自动化功能。
- `403`: 你的 API 密钥没有写入权限，或者你的请求来自不在 API 密钥允许列表中的 IP 地址。
- `404`: 该项目不存在或不属于你的组织，或者该自动化不存在或不属于此项目。
- `429`: 你已超出速率限制：每个组织每 10 秒 10 个请求。此限制由触发部署、触发自动化和自动化 webhook 端点共享。
- `500`: 发生了意外的服务器错误。请重试该请求。如果错误仍然存在，请联系支持团队。

## Changes

- **2026-10-30** `bf07d949aec9`: 4 info
  - added the non-success response with the status `401`
  - added the non-success response with the status `403`
  - added the non-success response with the status `429`
  - added the non-success response with the status `500`
- **2026-07-02** `c57b3da5a8f9`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/mintlify/apis/mintlify-external-api/zh/changes/workflow/:projectId/:workflowSchemaId/trigger/post.md)

---

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