Update a playbook
Updates any of name, description and definition. Only a change to definition archives a new version; a rename or a rewrite of the definition the playbook already holds leaves version where it is. A case keeps the version it was created on.
A new version is authored by the caller, checked as on create: 403 PLAYBOOK_EXECUTOR_FORBIDDEN for an executor it may not start, 409 PLAYBOOK_AUTHOR_UNAVAILABLE for a trigger or OAuth token.
Request
- Base URL: https://api.naturali.ai
- URL: https://api.naturali.ai/v1/projects/{project_id}/playbooks/{playbook_id}
- Auth: one of:
- HTTP bearer
- OAuth 2 (authorization code, authorization URL https://api.naturali.ai/authorize, token URL https://api.naturali.ai/token, scopes: mcp:access)
Path parameters
The playbook ID
Headers
The version the caller believes the resource holds, as an entity tag (3 or "3"). Equivalent to expected_version in the request body; * states no precondition beyond the resource existing. A mismatch is 409 VERSION_CONFLICT.
Request body
Example request
{
"definition": {
"nodes": [
{
"id": "regime",
"title": "Tax regime",
"inputs": [
{
"name": "revenue",
"schema": {
"type": "number"
},
"source": {
"node_id": "revenue",
"field": "output.annual_revenue"
}
}
],
"executor": {
"id": "dcd_V1StGXR8Z5jdHi6B"
},
"transformations": [
{
"name": "proposal",
"format": "pdf",
"tool": "tool_V1StGXR8Z5jdHi6B"
}
]
}
]
},
"expected_version": 3
}Response
Playbook updated
Example response
{
"id": "pbk_V1StGXR8Z5jdHi6B",
"project_id": "proj_V1StGXR8Z5jdHi6B",
"name": "client-pricing",
"version": 1,
"definition": {
"nodes": [
{
"id": "regime",
"title": "Tax regime",
"inputs": [
{
"name": "revenue",
"schema": {
"type": "number"
},
"source": {
"node_id": "revenue",
"field": "output.annual_revenue"
}
}
],
"executor": {
"id": "dcd_V1StGXR8Z5jdHi6B"
},
"transformations": [
{
"name": "proposal",
"format": "pdf",
"tool": "tool_V1StGXR8Z5jdHi6B"
}
]
}
]
}
}Changes
No recorded changes to this operation across all 1 revision of this API.