{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/skyvern-com/json-schema/skyvern-com-workflow-run-schema.json",
  "title": "WorkflowRun",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/skyvern-com-openapi.json#/components/schemas/WorkflowRun",
  "properties": {
    "workflow_run_id": {
      "type": "string",
      "title": "Workflow Run Id"
    },
    "workflow_id": {
      "type": "string",
      "title": "Workflow Id"
    },
    "workflow_permanent_id": {
      "type": "string",
      "title": "Workflow Permanent Id"
    },
    "organization_id": {
      "type": "string",
      "title": "Organization Id"
    },
    "browser_session_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Browser Session Id"
    },
    "browser_profile_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Browser Profile Id"
    },
    "browser_seed_source": {
      "anyOf": [
        {
          "$ref": "#/$defs/BrowserSeedSource"
        },
        {
          "type": "null"
        }
      ]
    },
    "browser_sink_profile_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Browser Sink Profile Id"
    },
    "start_fresh_browser": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Start Fresh Browser"
    },
    "reuse_browser_session": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Reuse Browser Session"
    },
    "debug_session_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Debug Session Id"
    },
    "status": {
      "$ref": "#/$defs/WorkflowRunStatus"
    },
    "attempt": {
      "type": "integer",
      "title": "Attempt",
      "description": "One-based number of the current workflow run attempt",
      "default": 1
    },
    "retry_pending": {
      "type": "boolean",
      "title": "Retry Pending",
      "description": "Whether another attempt is scheduled for this workflow run",
      "default": false
    },
    "next_attempt_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Next Attempt At",
      "description": "Timestamp when the next workflow run attempt is scheduled"
    },
    "attempts": {
      "items": {
        "$ref": "#/$defs/WorkflowRunAttempt"
      },
      "type": "array",
      "title": "Attempts",
      "description": "Attempts recorded for this workflow run"
    },
    "extra_http_headers": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Extra Http Headers"
    },
    "cdp_connect_headers": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Cdp Connect Headers"
    },
    "proxy_location": {
      "anyOf": [
        {
          "$ref": "#/$defs/ProxyLocation"
        },
        {
          "$ref": "#/$defs/GeoTarget"
        },
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Proxy Location"
    },
    "webhook_callback_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Webhook Callback Url"
    },
    "webhook_failure_reason": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Webhook Failure Reason"
    },
    "totp_verification_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Totp Verification Url"
    },
    "totp_identifier": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Totp Identifier"
    },
    "failure_reason": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Failure Reason"
    },
    "failure_category": {
      "anyOf": [
        {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Failure Category"
    },
    "retried_from_workflow_run_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Retried From Workflow Run Id"
    },
    "fallback_attempt": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Fallback Attempt"
    },
    "parent_workflow_run_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Parent Workflow Run Id"
    },
    "workflow_title": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Workflow Title"
    },
    "max_screenshot_scrolls": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Max Screenshot Scrolls"
    },
    "max_elapsed_time_minutes": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Max Elapsed Time Minutes"
    },
    "browser_address": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Browser Address"
    },
    "run_with": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Run With"
    },
    "browser_type": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Browser Type"
    },
    "browser_settings": {
      "anyOf": [
        {
          "$ref": "#/$defs/BrowserSettings"
        },
        {
          "type": "null"
        }
      ],
      "description": "Browser settings copied from the workflow version when the run was created"
    },
    "browser_settings_receipt": {
      "anyOf": [
        {
          "$ref": "#/$defs/BrowserSettingsReceipt"
        },
        {
          "type": "null"
        }
      ]
    },
    "script_run": {
      "anyOf": [
        {
          "$ref": "#/$defs/ScriptRunResponse"
        },
        {
          "type": "null"
        }
      ]
    },
    "job_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Job Id"
    },
    "depends_on_workflow_run_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Depends On Workflow Run Id"
    },
    "sequential_key": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Sequential Key"
    },
    "sequential_credential_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Sequential Credential Id"
    },
    "ai_fallback": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Ai Fallback"
    },
    "code_gen": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Code Gen"
    },
    "trigger_type": {
      "anyOf": [
        {
          "$ref": "#/$defs/WorkflowRunTriggerType"
        },
        {
          "type": "null"
        }
      ]
    },
    "workflow_schedule_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Workflow Schedule Id"
    },
    "ignore_inherited_workflow_system_prompt": {
      "type": "boolean",
      "title": "Ignore Inherited Workflow System Prompt",
      "default": false
    },
    "copilot_session_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Copilot Session Id"
    },
    "created_by": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Created By",
      "description": "ID of the user who started the run"
    },
    "credits_used": {
      "type": "integer",
      "title": "Credits Used",
      "default": 0
    },
    "cached_credits_used": {
      "type": "integer",
      "title": "Cached Credits Used",
      "default": 0
    },
    "queued_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Queued At"
    },
    "started_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Started At"
    },
    "finished_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Finished At"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "modified_at": {
      "type": "string",
      "format": "date-time",
      "title": "Modified At"
    }
  },
  "type": "object",
  "required": [
    "workflow_run_id",
    "workflow_id",
    "workflow_permanent_id",
    "organization_id",
    "status",
    "created_at",
    "modified_at"
  ],
  "$defs": {
    "BrowserSeedSource": {
      "type": "string",
      "enum": [
        "override",
        "picked",
        "own_memory",
        "credential",
        "fresh",
        "degraded_fresh"
      ],
      "title": "BrowserSeedSource",
      "description": "Which layer of the seed-precedence chain seeded a run's browser (provenance).\n\nResolved at run setup, before any browser creation, for all run types (C-semantics). A\nserialized Save & Reuse run re-resolves once more after the sequential wait, so a profile an\nearlier run in its lane saved while it was queued becomes own_memory rather than a stale pick.\n- override: explicit request browser_profile_id (one-run-only pick via API)\n- picked: the workflow's explicit profile pick (workflows.browser_profile_id) — \"always start here\"\n- own_memory: the workflow's own auto-profile (no pick + persist_browser_session)\n- credential: the run's selected credential's profile (rotation-aware; also the empty-own boot)\n- fresh: no seed profile\n- degraded_fresh: a resolved profile failed to load; ran fresh"
    },
    "BrowserSettings": {
      "properties": {
        "timezone_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Timezone Id",
          "description": "IANA timezone the browser reports to pages, for example `America/New_York`. Applied when a browser is created and takes precedence over any timezone implied by the proxy location. Offsets such as `+03:00` are rejected. Omit or set to null to keep the default behavior."
        }
      },
      "type": "object",
      "title": "BrowserSettings"
    },
    "BrowserSettingsReceipt": {
      "properties": {
        "requested_timezone_id": {
          "type": "string",
          "title": "Requested Timezone Id",
          "description": "The timezone that was requested."
        },
        "actual_timezone_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Actual Timezone Id",
          "description": "The timezone the browser reported when measured, or null when it could not be measured."
        },
        "source": {
          "$ref": "#/$defs/BrowserSettingsSource",
          "description": "Where the requested setting came from."
        },
        "status": {
          "$ref": "#/$defs/BrowserSettingsStatus",
          "description": "`verified` when the browser reported the requested timezone or an IANA alias of it (Chromium reports `Asia/Calcutta` for `Asia/Kolkata`), `mismatch` when it reported another zone, `unapplied` when the browser already existed and was left unchanged, `unknown` when it could not be measured."
        },
        "warning": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Warning"
        }
      },
      "type": "object",
      "required": [
        "requested_timezone_id",
        "source",
        "status"
      ],
      "title": "BrowserSettingsReceipt"
    },
    "BrowserSettingsSource": {
      "type": "string",
      "enum": [
        "workflow_version",
        "session_request",
        "existing_session"
      ],
      "title": "BrowserSettingsSource"
    },
    "BrowserSettingsStatus": {
      "type": "string",
      "enum": [
        "verified",
        "mismatch",
        "unapplied",
        "unknown"
      ],
      "title": "BrowserSettingsStatus"
    },
    "GeoTarget": {
      "properties": {
        "country": {
          "type": "string",
          "maxLength": 2,
          "minLength": 2,
          "title": "Country",
          "description": "ISO 3166-1 alpha-2 country code (e.g., 'US', 'GB', 'DE')"
        },
        "subdivision": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 10
            },
            {
              "type": "null"
            }
          ],
          "title": "Subdivision",
          "description": "ISO 3166-2 subdivision code without country prefix (e.g., 'CA' for California, 'NY' for New York)"
        },
        "city": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 100
            },
            {
              "type": "null"
            }
          ],
          "title": "City",
          "description": "City name in English from GeoNames (e.g., 'New York', 'Los Angeles', 'London')"
        },
        "isISP": {
          "type": "boolean",
          "title": "Isisp",
          "description": "Whether this geo target is marked as an ISP proxy location.",
          "default": false
        }
      },
      "type": "object",
      "required": [
        "country"
      ],
      "title": "GeoTarget",
      "description": "Granular proxy geo-targeting request with country, optional subdivision, and optional city."
    },
    "ProxyLocation": {
      "type": "string",
      "enum": [
        "RESIDENTIAL",
        "US-CA",
        "US-NY",
        "US-TX",
        "US-FL",
        "US-WA",
        "RESIDENTIAL_ES",
        "RESIDENTIAL_IE",
        "RESIDENTIAL_GB",
        "RESIDENTIAL_IN",
        "RESIDENTIAL_JP",
        "RESIDENTIAL_FR",
        "RESIDENTIAL_DE",
        "RESIDENTIAL_NZ",
        "RESIDENTIAL_ZA",
        "RESIDENTIAL_AR",
        "RESIDENTIAL_AU",
        "RESIDENTIAL_BR",
        "RESIDENTIAL_TR",
        "RESIDENTIAL_CA",
        "RESIDENTIAL_MX",
        "RESIDENTIAL_IT",
        "RESIDENTIAL_NL",
        "RESIDENTIAL_PH",
        "RESIDENTIAL_KR",
        "RESIDENTIAL_SA",
        "RESIDENTIAL_ISP",
        "NONE"
      ],
      "title": "ProxyLocation"
    },
    "RunStatus": {
      "type": "string",
      "enum": [
        "created",
        "queued",
        "running",
        "paused",
        "timed_out",
        "failed",
        "terminated",
        "completed",
        "canceled"
      ],
      "title": "RunStatus"
    },
    "ScriptRunResponse": {
      "properties": {
        "ai_fallback_triggered": {
          "type": "boolean",
          "title": "Ai Fallback Triggered",
          "default": false
        },
        "script_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Script Id"
        },
        "script_revision_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Script Revision Id"
        }
      },
      "type": "object",
      "title": "ScriptRunResponse"
    },
    "WorkflowRunAttempt": {
      "properties": {
        "attempt_number": {
          "type": "integer",
          "title": "Attempt Number",
          "description": "One-based number of this workflow run attempt"
        },
        "status": {
          "$ref": "#/$defs/RunStatus",
          "description": "Status of this workflow run attempt"
        },
        "failure_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Failure Reason",
          "description": "Reason for failure, if the attempt failed"
        },
        "error_codes": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Error Codes",
          "description": "Error codes reported by this attempt"
        },
        "started_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Started At",
          "description": "Timestamp when this attempt started"
        },
        "finished_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Finished At",
          "description": "Timestamp when this attempt finished"
        },
        "retry_decision": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Retry Decision",
          "description": "Retry decision recorded for this attempt"
        },
        "decision_reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Decision Reason",
          "description": "Reason recorded for the retry decision"
        },
        "next_attempt_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Next Attempt At",
          "description": "Timestamp when the next attempt is scheduled"
        },
        "webhook_sent_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Webhook Sent At",
          "description": "Timestamp when the webhook for this attempt was sent"
        }
      },
      "type": "object",
      "required": [
        "attempt_number",
        "status"
      ],
      "title": "WorkflowRunAttempt"
    },
    "WorkflowRunStatus": {
      "type": "string",
      "enum": [
        "created",
        "queued",
        "running",
        "failed",
        "terminated",
        "canceled",
        "timed_out",
        "completed",
        "paused"
      ],
      "title": "WorkflowRunStatus"
    },
    "WorkflowRunTriggerType": {
      "type": "string",
      "enum": [
        "manual",
        "mcp",
        "api",
        "scheduled",
        "webhook",
        "event",
        "job_recipe_extract",
        "job_recipe_apply",
        "seo_recipe_submit"
      ],
      "title": "WorkflowRunTriggerType",
      "description": "How a workflow run was initiated.\n\n- manual: User clicked \"Run\" in the UI\n- mcp: First-party MCP client or Skyvern CLI request\n- api: Direct API call to the run endpoint\n- scheduled: Triggered by a cron schedule\n- webhook: Triggered by an external system via the webhook endpoint\n- event: Triggered by an external event source\n- job_recipe_extract: Launched by a job recipe extract request\n- job_recipe_apply: Launched by a job recipe apply request\n- seo_recipe_submit: Launched by an SEO recipe directory submission"
    }
  }
}