Update a playbook
PATCH/api/v1/playbooks/:playbook_id
Updates any of name, description, definition and policy_ids. Only a change to definition or policy_ids archives a new version; a rename or a rewrite the playbook already holds leaves version where it is. A case keeps the version it was created on.
Every write is checked as on create against the playbook as it stands after it: 400 VALIDATION_FAILED for one left without policy_ids, 403 POLICY_GRANT_NOT_HELD for a policy whose grants the caller does not hold, 403 ACTION_NOT_HELD for an executor it may not start, an EXECUTOR_NOT_FOUND problem for one that does not exist, EXECUTOR_ACTION_REQUIRED or EXECUTOR_ACTION_UNAVAILABLE for an mcp tool action a run could not call, EXECUTOR_TOOL_UNSUPPORTED for a client tool executor, TRANSFORMATION_TOOL_UNSUPPORTED for a client or mcp transformation tool.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 409
- 413
- 429
- 500
- 502
- 4XX
Playbook updated
Bad request — a malformed or invalid definition
Unauthorized
Forbidden
Playbook not found
The resource has moved past the version this write read (VERSION_CONFLICT): a stated expected_version or If-Match no longer matches, or a concurrent write took the version first. meta.current_version names the version in force. Nothing is written.
REQUEST_REJECTED — the request body is over the size the body parser accepts
QUOTA_EXCEEDED — a requests quota on the calling API key or its project is spent for the window; Retry-After says when it reopens
Response Headers
Seconds until the quota window admits a request again
Unexpected server error — INTERNAL_ERROR, with the raw message never forwarded
The deployment's admission service is asked about this write and did not answer — ADMISSION_UNAVAILABLE; the write did not happen
The deployment's admission service refused this write — answered under the service's own 4xx status, with its code (matching ^[A-Za-z_][A-Za-z0-9_]{0,63}$, not necessarily an ERROR_CODES key), message and meta; the write did not happen. A status this operation also declares on its own is documented there