{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/proxymail-qa/json-schema/proxymail-qa-run-schema.json",
  "title": "Run",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/proxymail-qa-openapi.json#/components/schemas/Run",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "source": {
      "type": "string",
      "enum": [
        "ci",
        "agent",
        "api"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "running",
        "passed",
        "failed"
      ]
    },
    "meta": {
      "type": "object"
    },
    "started_at": {
      "type": "string",
      "format": "date-time"
    },
    "finished_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "url": {
      "type": "string",
      "format": "uri",
      "description": "The run in the app."
    },
    "project": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "events": {
      "type": "array",
      "description": "What the run saw, oldest first. Not in lists.",
      "items": {
        "type": "object",
        "properties": {
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "kind": {
            "type": "string",
            "enum": [
              "address",
              "email",
              "missing",
              "none",
              "count",
              "checks",
              "note",
              "checkout",
              "test",
              "unsubscribe",
              "offers",
              "coupon"
            ]
          },
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "failed": {
            "type": "boolean"
          },
          "detail": {
            "type": "object",
            "description": "email: type, subtype, service, received_at, after_seconds, and code (with a coupon's discount) or link and goes_to ({ site, path }). missing: what was waited for and hint. none: arrived, since, until, and the email (type, subtype, category). count: count. checks: the email (type, subtype, category), passed, failed, warnings, notes and spam_score. checkout: tags and until. test: name, status, duration_ms and error, or totals. unsubscribe: action, sender and watches. offers: sender, reused and variants (never the codes). coupon: code, result, message, discount_applied and verdict. note: text."
          }
        }
      }
    },
    "deliverability": {
      "type": "object",
      "description": "Only in a single run, when it checked any email with spam checks on in Labs: how many emails were checked, how many look likely to be rejected or filed as spam, may go to spam, carry a harmful attachment, and the highest spam score out of 10.",
      "properties": {
        "checked": {
          "type": "integer"
        },
        "likely_spam": {
          "type": "integer"
        },
        "may_spam": {
          "type": "integer"
        },
        "harmful_attachments": {
          "type": "integer"
        },
        "highest_spam_score": {
          "type": [
            "number",
            "null"
          ]
        }
      }
    },
    "comparison": {
      "type": [
        "object",
        "null"
      ],
      "description": "Only in a single run: how it differs from up to 10 finished runs before it with the same name; null without any.",
      "properties": {
        "runs": {
          "type": "integer",
          "description": "How many earlier runs it was compared with."
        },
        "changes": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "new_failure",
                  "not_run",
                  "fixed",
                  "slower",
                  "count",
                  "flaky",
                  "new_step",
                  "sender",
                  "site"
                ]
              },
              "text": {
                "type": "array",
                "description": "Words, { code } for a value, or { quote } for text from an email or client.",
                "items": {}
              }
            }
          }
        }
      }
    }
  }
}