{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentisend-com/json-schema/agentisend-com-patch-automations-by-id-body-schema.json",
  "title": "PatchAutomationsBy_idBody",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agentisend-com-automations-api-openapi.yml#/components/schemas/PatchAutomationsBy_idBody",
  "properties": {
    "connections": {
      "description": "Graph only: the links between steps, by key. type is default, condition_met / condition_not_met from a condition, or event_received / timeout from a wait_for_event. Sent together with steps.",
      "items": {
        "additionalProperties": false,
        "properties": {
          "from": {
            "description": "The key of the step the connection leaves.",
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          },
          "to": {
            "description": "The key of the step it leads to.",
            "maxLength": 100,
            "minLength": 1,
            "type": "string"
          },
          "type": {
            "description": "default, or condition_met / condition_not_met from a condition, or event_received / timeout from a wait_for_event.",
            "enum": [
              "default",
              "condition_met",
              "condition_not_met",
              "timeout",
              "event_received"
            ],
            "type": "string"
          }
        },
        "required": [
          "from",
          "to"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "name": {
      "maxLength": 200,
      "minLength": 1,
      "type": "string"
    },
    "status": {
      "description": "enabled snapshots a version and starts firing; disabled stops new runs.",
      "enum": [
        "enabled",
        "disabled"
      ],
      "type": "string"
    },
    "steps": {
      "description": "Linear: ordered steps with kind email, webhook or ab_split, beside a trigger. Graph (Resend): steps with key, type (trigger, delay, send_email, wait_for_event, condition, contact_update, contact_delete, add_to_segment) and config, sent together with connections. A graph has exactly one trigger step, at most 150 steps, every step reachable from the trigger and no loops.",
      "items": {
        "additionalProperties": {},
        "propertyNames": {
          "type": "string"
        },
        "type": "object"
      },
      "minItems": 1,
      "type": "array"
    },
    "trigger": {
      "description": "Linear automations: what starts a run.",
      "properties": {
        "event_name": {
          "maxLength": 200,
          "minLength": 1,
          "type": "string"
        },
        "interval_minutes": {
          "maximum": 9007199254740991,
          "minimum": 1,
          "type": "integer"
        },
        "segment_id": {
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
          "type": "string"
        },
        "type": {
          "enum": [
            "custom_event",
            "contact.created",
            "contact.updated",
            "segment.joined",
            "segment.left",
            "scheduled"
          ],
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    }
  },
  "type": "object"
}