---
title: "立即运行自动化"
method: POST
path: "/automations/{id}/run"
tags: ["自动化"]
---

# 立即运行自动化

`POST /automations/{id}/run`

## Request

- Base URL: `/api/v1` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/v1/automations/{id}/run`
- Auth: API key in header `Authorization`

排队一次手动运行；已有运行在排队或进行中时拒绝

## Path parameters

- `id` string, required

## Response `202`

排队的运行

- object
  - `data` GithubComTencentWeKnoraInternalTypesAutomationRun
    - `answer` string: Answer is the start of the final answer, for listings.
    - `assistant_message_id` string
    - `automation_id` string
    - `cancel_requested` boolean: CancelRequested stops the run at its next check.
    - `created_at` string
    - `error` string
    - `finished_at` string
    - `id` string
    - `pending_prompt_id` string: PendingPromptID is the approval a waiting run is suspended on.
    - `scheduled_at` string: ScheduledAt is when the run was due; for a manual run, when it was asked for.
    - `session_id` string
    - `started_at` string
    - `status` string
    - `tenant_id` integer
    - `trigger_kind` string
    - `updated_at` string
    - `usage` object
    - `user_message_id` string: UserMessageID and AssistantMessageID are the run's turn in SessionID.
  - `success` boolean

## Other responses

- `409`: 已有运行

## Changes

- **2026-10-19** `80c72611fac6`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/tencentblueking/apis/weknora-api/changes/automations/:id/run/post.md)

---

[API](https://skmtc.dev/tencentblueking/apis/weknora-api.md) - [All operations](https://skmtc.dev/tencentblueking/apis/weknora-api/llms.txt) - [OpenAPI document](https://skmtc.dev/tencentblueking/apis/weknora-api/revisions/685d1f9fce30?raw)
