跳转到主要内容
POST
/
agent
/
{projectId}
/
job
/
{id}
/
message
Send message to agent job
curl --request POST \
  --url https://api.mintlify.com/v2/agent/{projectId}/job/{id}/message \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "<string>"
}
'
{
  "id": "<string>",
  "status": "active",
  "source": {
    "repository": "<string>",
    "ref": "<string>"
  },
  "model": "<string>",
  "prLink": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "archivedAt": "2023-11-07T05:31:56Z"
}
此端点向现有代理任务会话发送额外消息。使用它来继续与代理的对话、提供澄清或请求额外更改。

何时使用

  • 在初始任务后请求额外的文档更改
  • 向代理提供澄清或更正
  • 询问有关所做更改的后续问题
  • 请求修改草稿 pull request

使用说明

  • 代理在后台处理消息
  • 轮询获取代理任务端点以查看更新状态
  • 会话必须为 active 才能接收消息
  • completedfailed 任务发送消息会返回错误

授权

Authorization
string
header
必填

The Authorization header expects a Bearer token. Use an admin API key (prefixed with mint_). This is a server-side secret key. Generate one on the API keys page in your dashboard.

路径参数

projectId
string
必填

Your project ID. Can be copied from the API keys page in your dashboard.

id
string
必填

The unique identifier of the agent job to send a message to.

请求体

application/json
prompt
string
必填

The message content to send to the agent.

响应

Message sent successfully. The agent processes it in the background.

id
string

Unique identifier for the agent job.

status
enum<string>

Current status of the agent job.

可用选项:
active,
completed,
archived,
failed
source
object

Information about the source repository.

model
string

The AI model used for this job.

URL of the pull request created by the agent. Null until the PR is created.

createdAt
string<date-time>

Timestamp when the job was created.

archivedAt
string<date-time> | null

Timestamp when the job was archived. Null if still active.