OpenAI 删除自动化任务

2026-11-18 17:52 更新

delete /agents/automations/{automation_id}

删除自动化任务并阻止后续调用,目标会话保留。

路径参数

  • automation_id: string

minLength: 0, maxLength: 1048576

返回值

  • AutomationDeleted object { id, deleted, object }

  • id: string

已删除的自动化任务 ID。

minLength: 0

  • deleted: boolean

恒为 true。

  • object: "agent.automation.deleted" (default: "agent.automation.deleted")

固定为 agent.automation.deleted。

  • "agent.automation.deleted"

示例

## 从环境变量读取 API 密钥。
## 将 AUTOMATION_ID 设置为目标自动化任务的 ID。
curl https://api.openai.com/v1/agents/automations/$AUTOMATION_ID \
    -X DELETE \
    -H 'OpenAI-Beta: agents=v1' \
    -H "Authorization: Bearer $OPENAI_API_KEY"

200 响应示例

字段名、类型值和示例标识均按接口定义保留。

{
  "id": "id",
  "deleted": true,
  "object": "agent.automation.deleted"
}
以上内容是否对您有帮助:
在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号