Create a playbook
POST/api/v1/playbooks
Creates a playbook at version 1. The definition is refused with 400 PLAYBOOK_VALIDATION_FAILED when it holds a duplicate node or input, an input reading a missing node or field, an execute node without an executor or another kind with one, transformations on a non-final node, or a cycle; meta.problems lists every one. A duplicate name in the project is 409 NAME_CONFLICT.
The version's executors run under policy_ids, required and non-empty (400 VALIDATION_FAILED). The caller must hold every grant of each policy it names (403 POLICY_GRANT_NOT_HELD) and be allowed to start every executor the definition names (403 ACTION_NOT_HELD), and each must exist in the project, or be an agent or tool shared with it (400 PLAYBOOK_VALIDATION_FAILED, an EXECUTOR_NOT_FOUND problem). A tool executor on an mcp tool must name in operation_id an action the tool's binding allows (EXECUTOR_ACTION_REQUIRED, EXECUTOR_ACTION_UNAVAILABLE). An executor cannot be a client tool (EXECUTOR_TOOL_UNSUPPORTED), nor a transformation's tool a client or mcp tool (TRANSFORMATION_TOOL_UNSUPPORTED).
Request
Responses
- 201
- 400
- 401
- 403
- 409
- 413
- 429
- 500
- 502
- 4XX
Playbook created
Bad request — a malformed or invalid definition
Unauthorized
Forbidden
A playbook with this name already exists in the project
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