{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/inboxpolicy-com/json-schema/inboxpolicy-com-create-run-request-schema.json",
  "title": "CreateRunRequest",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/inboxpolicy-com-openapi.json#/components/schemas/CreateRunRequest",
  "properties": {
    "connector_id": {
      "type": "string",
      "description": "ID of the connector to execute."
    },
    "arguments": {
      "additionalProperties": true,
      "type": "object",
      "description": "Arguments to pass to the connector. Optional if the connector does not require any arguments."
    },
    "secret_bindings": {
      "additionalProperties": {
        "type": "string"
      },
      "type": "object",
      "description": "Mapping of secret slot names to the IDs of saved, user-owned secrets. Each of the connector's required_secrets must appear here or in secret_values, but not both."
    },
    "secret_values": {
      "additionalProperties": {
        "anyOf": [
          {
            "$ref": "#/$defs/LoginSecretValue"
          },
          {
            "$ref": "#/$defs/StringSecretValue"
          }
        ]
      },
      "type": "object",
      "description": "Mapping of secret slot names to secret values supplied directly for this run, instead of referencing a saved secret. Use a login shape ({username, password, totp_secret?}) for login slots and a string shape ({value}) for string slots. Values are not persisted."
    },
    "async": {
      "type": "boolean",
      "description": "When true, return immediately with a pending run; poll retrieveRun for the result. Results above 1,000,000 UTF-8 JSON bytes are discarded and finish with result_too_large. Retry those requests with async=false to receive the result directly.",
      "default": false
    },
    "max_timeout_s": {
      "type": "integer",
      "maximum": 3600.0,
      "minimum": 1.0,
      "description": "Maximum execution time in seconds before the run is timed out.",
      "default": 300
    },
    "proxy_settings": {
      "anyOf": [
        {
          "oneOf": [
            {
              "$ref": "#/$defs/IspProxy"
            },
            {
              "$ref": "#/$defs/ResidentialProxy"
            }
          ]
        },
        {
          "type": "null"
        }
      ],
      "description": "Proxy for the network traffic of this run. If you do not set it, a setting is automatically determined by the platform."
    }
  },
  "type": "object",
  "required": [
    "connector_id"
  ],
  "$defs": {
    "Country": {
      "type": "string",
      "enum": [
        "at",
        "be",
        "ca",
        "ch",
        "de",
        "dk",
        "es",
        "fi",
        "fr",
        "gb",
        "ie",
        "it",
        "lu",
        "mx",
        "nl",
        "no",
        "pt",
        "se",
        "us"
      ]
    },
    "IspProxy": {
      "properties": {
        "type": {
          "type": "string",
          "const": "isp",
          "title": "Type",
          "default": "isp"
        },
        "location": {
          "type": "string",
          "const": "us",
          "title": "Location"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "location"
      ],
      "title": "IspProxy"
    },
    "LoginSecretValue": {
      "properties": {
        "username": {
          "type": "string",
          "description": "Username for the login."
        },
        "password": {
          "type": "string",
          "description": "Password for the login."
        },
        "totp_secret": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "TOTP seed, when the login uses 2FA."
        }
      },
      "type": "object",
      "required": [
        "username",
        "password"
      ],
      "title": "LoginSecretValue"
    },
    "ResidentialProxy": {
      "properties": {
        "type": {
          "type": "string",
          "const": "residential",
          "title": "Type",
          "default": "residential"
        },
        "location": {
          "$ref": "#/$defs/Country"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "location"
      ],
      "title": "ResidentialProxy"
    },
    "StringSecretValue": {
      "properties": {
        "value": {
          "type": "string",
          "description": "The secret value."
        }
      },
      "type": "object",
      "required": [
        "value"
      ],
      "title": "StringSecretValue"
    }
  }
}