{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/run402-com/json-schema/run402-com-function-run-create-request-schema.json",
  "title": "FunctionRunCreateRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/run402-com-functions-api-openapi.yml#/components/schemas/FunctionRunCreateRequest",
  "type": "object",
  "required": [
    "event_type"
  ],
  "properties": {
    "event_type": {
      "type": "string",
      "minLength": 1
    },
    "payload": {
      "type": "object",
      "additionalProperties": true,
      "default": {}
    },
    "idempotency_key": {
      "type": "string",
      "description": "Stable idempotency key. May be mirrored by the Idempotency-Key header."
    },
    "run_at": {
      "type": "string",
      "format": "date-time",
      "description": "Absolute execution time. Mutually exclusive with delay_seconds."
    },
    "delay_seconds": {
      "type": "number",
      "minimum": 0,
      "description": "Relative execution delay in seconds. Mutually exclusive with run_at."
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "description": "Optional deadline after which an unstarted run expires."
    },
    "retry": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "preset": {
          "type": "string"
        },
        "max_attempts": {
          "type": "integer",
          "minimum": 1
        },
        "min_delay_seconds": {
          "type": "integer",
          "minimum": 0
        },
        "max_delay_seconds": {
          "type": "integer",
          "minimum": 0
        }
      }
    }
  },
  "additionalProperties": false
}