---
title: "发送后续消息"
method: POST
path: "/v2/agent/{projectId}/job/{id}/message"
language: "zh-Hans"
---

# 发送后续消息

`POST /v2/agent/{projectId}/job/{id}/message`

## Request

- Base URL: `https://api.mintlify.com`
- URL: `https://api.mintlify.com/v2/agent/{projectId}/job/{id}/message`
- Auth: HTTP bearer

向现有代理任务发送后续消息。该消息将异步处理。请轮询 get job 端点以跟踪进度。

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

## Path parameters

- `projectId` string, required
- `id` string, required

## Request body

- object
  - `prompt` string, required: 发送给代理的后续指令。

## Response `200`

消息发送成功

- AgentJob
  - `id` string: 代理任务的唯一标识符。
  - `status` 'active' | 'completed' | 'archived' | 'failed': 作业的当前状态。`active`——代理当前正在处理提示词。`completed`——代理已成功完成，并且可能已创建 PR（请检查 `prLink`）。`archived`——作业已归档。`failed`——代理遇到了不可恢复的错误。请持续轮询，直到状态变为 `completed`、`archived` 或 `failed`。
  - `source` object: 源存储库信息。
    - `repository` string: GitHub 存储库的完整 URL。
    - `ref` string, nullable: 代理正在处理的 Git branch。
  - `model` string: 此作业使用的 AI 模型。
  - `prLink` string, uri, nullable: 由代理创建的 GitHub 拉取请求（PR；亦称“合并请求”/Merge Request）URL。作业仍处于 `active` 状态或没有文件变更时，该值为 `null`。代理成功创建 PR 后，此字段会被填充。
  - `createdAt` string, date-time: 作业创建时的时间戳。
  - `archivedAt` string, date-time, nullable: 作业归档时的时间戳。

## Other responses

- `400`: 请求无效。缺少 `prompt` 或其为空、项目的主要 Git 来源不是 GitHub、项目未配置 GitHub 应用，或项目 ID 格式无效。
- `401`: API 密钥缺失或无效，或者你的套餐不包含 API 访问权限或代理功能。
- `403`: 你的 API 密钥没有写入权限，或者你的请求来自不在 API 密钥允许列表中的 IP 地址。
- `404`: 此项目中不存在具有该 ID 的代理任务，或者项目不存在或不属于你的组织。
- `429`: 你已超出每个组织每小时 100 次请求的速率限制。

## Changes

> 25 revisions in range; 2 not diffed.

- **2026-10-30** `8f632fe27713`: 2 info
  - added the non-success response with the status `401`
  - added the non-success response with the status `403`
- **2026-03-12** `b4e58059b285`: 1 warning
  - added the new `archived` enum value to the `status` response property for the response status `200`

[Operation history](https://skmtc.dev/mintlify/apis/mintlify-admin-api/zh/changes/v2/agent/:projectId/job/:id/message/post.md)

---

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