跳转到主要内容
POST
/
v2
/
enterprise
/
playbooks
创建企业 Playbook
curl --request POST \
  --url https://api.devin.ai/v2/enterprise/playbooks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "title": "<string>",
  "body": "<string>",
  "macro": "<string>"
}'
{
  "playbook_id": "playbook-e78391e2b86f4076a0b233c55c9df538",
  "title": "API POST",
  "body": "这是使用 v2 API 创建的",
  "status": "published",
  "access": "team",
  "account_id": "account-9a90315aa6334c66bc98bfd76f68455e",
  "macro": "!shsiangtest",
  "created_at": "2025-10-10T12:34:56Z",
  "updated_at": "2025-10-10T12:34:56Z"
}
创建一个新的 playbook。该 playbook 将关联到你的账户和企业。使用宏来创建快速快捷指令(例如:!deploy)。

请求体

title
string
required
Playbook 的标题(最小长度为 1 个字符)
body
string
required
Playbook 的内容/说明(最小长度为 1 个字符)
macro
string
Playbook 的可选宏/快捷命令(例如 !deploy

响应

{
  "playbook_id": "playbook-e78391e2b86f4076a0b233c55c9df538",
  "title": "API POST",
  "body": "这是使用 v2 API 创建的",
  "status": "published",
  "access": "team",
  "account_id": "account-9a90315aa6334c66bc98bfd76f68455e",
  "macro": "!shsiangtest",
  "created_at": "2025-10-10T12:34:56Z",
  "updated_at": "2025-10-10T12:34:56Z"
}