{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/strix-ai/json-schema/strix-ai-update-schedule-request-schema.json",
  "title": "UpdateScheduleRequest",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/strix-ai-openapi.json#/components/schemas/UpdateScheduleRequest",
  "type": "object",
  "properties": {
    "action": {
      "type": "string",
      "enum": [
        "pause",
        "resume"
      ],
      "description": "Pause or resume the schedule. Mutually exclusive with other fields."
    },
    "cloud_connection_ids": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      },
      "description": "Full replacement cloud-connection selection. Null restores the default, so each run uses the connections that apply to its targets. An empty array means no cloud connections."
    },
    "concerns": {
      "description": "Free-text security concerns to prioritize on each run.",
      "type": "string"
    },
    "connector_id": {
      "description": "ID of the network connector each run uses to reach a private network.",
      "type": "string"
    },
    "context": {
      "description": "Free-text background about the target for each run.",
      "type": "string"
    },
    "credentials": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "mfa_method": {
            "type": "string",
            "enum": [
              "none",
              "totp",
              "email_otp",
              "magic_link"
            ],
            "description": "Multi-factor method for authenticated scans."
          },
          "totp_secret": {
            "type": "string",
            "description": "Base32 TOTP secret, used when mfa_method is `totp`."
          },
          "mfa_email": {
            "type": "string",
            "format": "email",
            "description": "Inbox to read one-time codes / magic links from, used when mfa_method is `email_otp` or `magic_link`."
          },
          "login_url": {
            "type": "string",
            "format": "uri",
            "description": "Login page URL for this credential set."
          }
        },
        "required": [
          "username",
          "password"
        ]
      },
      "description": "Replaces ALL stored manual credentials for the schedule. Omit to keep the stored credentials unchanged (the template endpoint returns their metadata only)."
    },
    "cron_expression": {
      "description": "New cron expression, for example `0 9 * * 1`.",
      "type": "string"
    },
    "domain_ids": {
      "description": "Full replacement list of domain UUIDs to test on each run.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "domain_paths": {
      "description": "Map of domain ID to specific paths to scan on each run.",
      "type": "object",
      "additionalProperties": {
        "type": "array",
        "items": {
          "type": "string"
        }
      }
    },
    "focus": {
      "description": "Free-text areas of the target to test first on each run.",
      "type": "string"
    },
    "headers": {
      "type": "array",
      "description": "Full replacement set of custom headers. Stored header values are never returned by the template endpoint. Send keep_stored_value: true (with no value) to reuse the stored value of the existing schedule header with the same name.",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "keep_stored_value": {
            "type": "boolean",
            "description": "Reuse the stored value of the existing header with the same name instead of sending one."
          }
        },
        "required": [
          "name"
        ]
      }
    },
    "internal_targets": {
      "description": "Full replacement list of private-network hosts or URLs to test through the connector.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "knowledge_resource_pins": {
      "type": [
        "array",
        "null"
      ],
      "maxItems": 100,
      "items": {
        "$ref": "#/$defs/RunKnowledgeResourcePin"
      },
      "description": "Full replacement set of per-run provider resources. Send null to clear."
    },
    "max_budget_usd": {
      "type": [
        "number",
        "null"
      ],
      "exclusiveMinimum": 0,
      "maximum": 1000000,
      "description": "Self-hosted only: per-run LLM cost limit (USD) applied to each fired scan. Send null to clear. Spend is counted from the model config's Pricing when it is set. Otherwise it uses the cost the provider reports, or the LiteLLM price table."
    },
    "budget_policy": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "stop",
        "pause",
        null
      ],
      "description": "Self-hosted only: cost-limit policy applied to each fired scan. Send null to use the deployment default."
    },
    "model_config_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "Self-hosted installs and hosted organizations on their own LLM keys: run each fired scan with this named model config from Settings → LLM Models. Send null to use the default assignment. If the config is deleted later, each fire fails until you choose another config or send null."
    },
    "name": {
      "description": "New display name of the schedule.",
      "type": "string"
    },
    "notification_emails": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "email"
      },
      "description": "Extra addresses to CC on each run's completion email. Validated only when notify_on_completion is true."
    },
    "notify_on_completion": {
      "type": "boolean",
      "description": "Email the schedule owner when each run completes."
    },
    "org_knowledge_enabled": {
      "description": "When true, each run uses the organization knowledge base.",
      "type": "boolean"
    },
    "repository_branches": {
      "description": "Map of repository ID to the branch name to test on each run.",
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "repository_ids": {
      "description": "Full replacement list of repository UUIDs to test on each run.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "scope": {
      "type": "object",
      "description": "Per-run scope control applied to each fire. Send an empty object to clear the stored scope.",
      "properties": {
        "seeds": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "allow": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ScopeEntry"
          }
        },
        "visible": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ScopeEntry"
          }
        },
        "deny": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ScopeEntry"
          }
        }
      }
    },
    "test_user_ids": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid"
      },
      "description": "Saved test users attach to domain targets they cover or to internal_infra scans on the same network."
    },
    "timezone": {
      "description": "New IANA timezone for the cron expression, for example `America/New_York`.",
      "type": "string"
    },
    "upload_ids": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid"
      },
      "description": "Replaces the schedule's uploads. Stored uploads the caller cannot access (hidden from the template for target-scoped actors) are preserved automatically."
    }
  },
  "$defs": {
    "RunKnowledgeResourcePin": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "connection_id": {
          "type": "string",
          "minLength": 1,
          "description": "Organization cloud connection that owns the resource."
        },
        "page_id": {
          "type": "string",
          "minLength": 1,
          "description": "Provider-specific opaque resource identifier."
        },
        "label": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "url": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "guidance": {
          "type": "string",
          "maxLength": 500,
          "description": "Optional context: what the resource holds and when Strix should read it."
        }
      },
      "required": [
        "connection_id",
        "page_id",
        "label",
        "url"
      ]
    },
    "ScopeEntry": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "domain",
            "subdomain",
            "wildcard"
          ]
        },
        "value": {
          "type": "string",
          "description": "e.g. \"app.acme.com\" or \"*.acme.com\"."
        },
        "source": {
          "type": "string",
          "enum": [
            "seed",
            "discovery",
            "manual"
          ]
        }
      },
      "required": [
        "kind",
        "value",
        "source"
      ]
    }
  }
}