{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/knoxcall/json-schema/knoxcall-workflow-schema.json",
  "title": "Workflow",
  "description": "A workflow — a graph of nodes executed on a trigger.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/knoxcall-workflows-api-openapi.yml#/components/schemas/Workflow",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "definition": {
      "type": "object",
      "description": "The workflow graph (nodes and edges). A webhook trigger node's `data.config.authentication` is MASKED on read: the scheme (`type`, `format`, `header`) is returned, and every credential field (`token`, `secret`, ...) reads back as `***CONFIGURED***`. Submitting that sentinel on create/update means \"leave the stored value unchanged\", so a read-modify-write round trip is safe; on create, where there is no stored value, it is dropped.",
      "additionalProperties": true
    },
    "environment": {
      "type": [
        "string",
        "null"
      ]
    },
    "enabled": {
      "type": "boolean"
    },
    "version": {
      "type": "integer"
    },
    "sandbox": {
      "type": "boolean"
    },
    "timeout_seconds": {
      "type": [
        "integer",
        "null"
      ]
    },
    "published_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    },
    "run_count": {
      "type": "integer",
      "description": "Number of executions (present on list responses)."
    }
  },
  "required": [
    "id",
    "name",
    "definition",
    "enabled",
    "version",
    "sandbox",
    "created_at",
    "updated_at"
  ]
}