{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/cm-com/main/json-schema/cm-com-cm-data-core-workflows-api-models-workflows-api-workflow-schema.json",
  "title": "CM.Data.Core.Workflows.Api.Models.Workflows.ApiWorkflow",
  "x-generated": "2026-10-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cm-com-mobile-marketing-cloud-cdp-profiles-v1-openapi.yml#/components/schemas/CM.Data.Core.Workflows.Api.Models.Workflows.ApiWorkflow",
  "type": "object",
  "properties": {
    "jsonType": {
      "type": [
        "string",
        "null"
      ],
      "readOnly": true
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": [
        "string",
        "null"
      ]
    },
    "consentPurposeId": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "steps": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/CM.Data.Core.Workflows.Api.Models.Steps.ApiStep"
      }
    },
    "goal": {
      "$ref": "#/$defs/CM.Data.Core.Workflows.Api.Models.ApiGoal"
    },
    "enabled": {
      "type": "boolean"
    },
    "isReady": {
      "type": "boolean"
    },
    "createdBy": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "createdOn": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "modifiedBy": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "modifiedOn": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "isFavorite": {
      "type": [
        "boolean",
        "null"
      ]
    }
  },
  "additionalProperties": false,
  "$defs": {
    "CM.Data.Core.Workflows.Api.Models.ApiGoal": {
      "type": "object",
      "properties": {
        "eventTypeId": {
          "type": "string",
          "format": "uuid"
        },
        "propertyName": {
          "type": [
            "string",
            "null"
          ]
        },
        "value": {
          "type": [
            "string",
            "null"
          ]
        },
        "stopWorkflowWhenGoalIsMet": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "CM.Data.Core.Workflows.Api.Models.Steps.ApiStep": {
      "type": "object",
      "properties": {
        "jsonType": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true
        },
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "nextStepId": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid"
        },
        "summary": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    }
  }
}