Playbooks

Write a case's inputs

Writes a batch of manual inputs, all or none. Each write names the revision it read in expected_revision, null for a field still unset; when any field has moved on the whole batch is refused with 409 PLAYBOOK_INPUT_CONFLICT and meta.conflicts names each field. An input the case's version does not declare, one that reads another node, or a value its schema refuses is 400 PLAYBOOK_INPUT_INVALID. A value equal to the field's current one writes no revision. Once written, every node the write makes runnable is queued to run, unless the case is paused. With wait: true it answers once every execution queued, and every one those queue, has settled or parked. A write made with a credential the case's own work runs as — the case, one of its executions in flight, or the task or run one started — is 403 PLAYBOOK_SELF_WRITE.

post/v1/projects/{project_id}/playbook-cases/{case_id}/inputs

Request

  • Base URL: https://api.naturali.ai
  • URL: https://api.naturali.ai/v1/projects/{project_id}/playbook-cases/{case_id}/inputs
  • 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

case_idstring required
Example:pbk_case_V1StGXR8Z5jdHi6B

The case ID

Request body

waitboolean

Answer once every execution the write queued, and every one those queue in turn, has settled or parked, instead of right away

Example request

{
  "inputs": [
    {
      "node_id": "revenue",
      "name": "revenue",
      "value": 4000000
    }
  ]
}

Response

The case after the write

idstring
project_idstring
playbook_idstring
playbook_versioninteger

The version the case was created on and is evaluated against

subjectstring
revisioninteger

The case's revision counter; every entry takes the next value

automation_status'idle' | 'running' | 'waiting' | 'paused'

paused while a pause of the case or of its project stands, else running while an execution is queued or runs its executor, else waiting while every execution in flight waits on a workflow task or orchestration run it started, else idle

pause_requested_atstring date-time nullable

When the case was paused; null while it runs

created_atstring date-time
updated_atstring date-time

Example response

{
  "id": "pbk_case_V1StGXR8Z5jdHi6B",
  "project_id": "proj_V1StGXR8Z5jdHi6B",
  "playbook_id": "pbk_V1StGXR8Z5jdHi6B",
  "playbook_version": 1,
  "nodes": [
    {
      "id": "regime",
      "run": {
        "id": "task_V1StGXR8Z5jdHi6B"
      }
    }
  ]
}

Changes

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