Playbooks

Validate a playbook definition

Answers what a create or update would be told about a definition, without writing: valid, and every graph problem it holds. A definition whose shape cannot be read is 400 VALIDATION_FAILED, as on a write.

post/v1/projects/{project_id}/playbooks/validate

Request

  • Base URL: https://api.naturali.ai
  • URL: https://api.naturali.ai/v1/projects/{project_id}/playbooks/validate
  • 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)

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"
          }
        ]
      }
    ]
  }
}

Response

Validation result

validboolean required

Example response

{
  "problems": [
    {
      "code": "MISSING_FIELD",
      "path": "nodes[0].agent_id",
      "message": "agent node 'a' is missing required field 'agent_id'."
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.