{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/email-spam-tester-com/json-schema/email-spam-tester-com-bimi-out-schema.json",
  "title": "BimiOut",
  "x-generated": "2026-11-06",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/email-spam-tester-com-openapi.json#/components/schemas/BimiOut",
  "properties": {
    "tool": {
      "type": "string",
      "title": "Tool"
    },
    "query": {
      "additionalProperties": {
        "type": "string"
      },
      "type": "object",
      "title": "Query",
      "description": "The inputs after normalisation."
    },
    "checked_at": {
      "type": "string",
      "title": "Checked At",
      "description": "When the lookups ran, ISO 8601 UTC."
    },
    "duration_ms": {
      "type": "integer",
      "title": "Duration Ms"
    },
    "status": {
      "type": "string",
      "enum": [
        "pass",
        "warn",
        "fail",
        "error"
      ],
      "title": "Status",
      "description": "Overall verdict. \"error\" means the check could not complete (timeout, SERVFAIL); it is never \"pass\" when a lookup the verdict needs failed."
    },
    "findings": {
      "items": {
        "$ref": "#/$defs/Finding"
      },
      "type": "array",
      "title": "Findings"
    },
    "steps": {
      "$ref": "#/$defs/BimiSteps"
    },
    "name": {
      "type": "string",
      "title": "Name"
    },
    "found_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Found At",
      "description": "Domain whose record applies; the organizational domain when the exact name has none."
    },
    "record": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Record"
    },
    "tags": {
      "$ref": "#/$defs/BimiTags"
    },
    "dmarc": {
      "$ref": "#/$defs/BimiDmarc"
    },
    "logo": {
      "anyOf": [
        {
          "$ref": "#/$defs/BimiLogo"
        },
        {
          "type": "null"
        }
      ]
    },
    "certificate": {
      "anyOf": [
        {
          "$ref": "#/$defs/BimiCertificate"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "type": "object",
  "required": [
    "tool",
    "query",
    "checked_at",
    "duration_ms",
    "status",
    "findings",
    "steps",
    "name",
    "found_at",
    "record",
    "tags",
    "dmarc",
    "logo",
    "certificate"
  ],
  "$defs": {
    "BimiCertSubject": {
      "properties": {
        "cn": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Cn"
        },
        "o": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "O"
        },
        "c": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "C"
        }
      },
      "type": "object",
      "required": [
        "cn",
        "o",
        "c"
      ],
      "title": "BimiCertSubject"
    },
    "BimiCertificate": {
      "properties": {
        "url": {
          "type": "string",
          "title": "Url"
        },
        "type": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "VMC",
                "CMC"
              ]
            },
            {
              "type": "null"
            }
          ],
          "title": "Type",
          "description": "From the mark type, when the certificate states one."
        },
        "subject": {
          "$ref": "#/$defs/BimiCertSubject"
        },
        "issuer": {
          "type": "string",
          "title": "Issuer"
        },
        "not_before": {
          "type": "string",
          "title": "Not Before"
        },
        "not_after": {
          "type": "string",
          "title": "Not After"
        },
        "days_left": {
          "type": "integer",
          "title": "Days Left"
        },
        "san": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "San"
        },
        "mark_type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Mark Type"
        },
        "eku_bimi": {
          "type": "boolean",
          "title": "Eku Bimi"
        },
        "logotype": {
          "type": "boolean",
          "title": "Logotype",
          "description": "Has the RFC 3709 logotype extension."
        },
        "logo_matches": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Logo Matches",
          "description": "The embedded logo equals the file at l=; null when either was not readable."
        },
        "chain_length": {
          "type": "integer",
          "title": "Chain Length"
        }
      },
      "type": "object",
      "required": [
        "url",
        "type",
        "subject",
        "issuer",
        "not_before",
        "not_after",
        "days_left",
        "san",
        "mark_type",
        "eku_bimi",
        "logotype",
        "logo_matches",
        "chain_length"
      ],
      "title": "BimiCertificate"
    },
    "BimiDmarc": {
      "properties": {
        "found_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Found At"
        },
        "record": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Record"
        },
        "policy": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Policy",
          "description": "The policy that applies to the domain."
        },
        "pct": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Pct"
        },
        "sp": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sp"
        }
      },
      "type": "object",
      "required": [
        "found_at",
        "record",
        "policy",
        "pct",
        "sp"
      ],
      "title": "BimiDmarc"
    },
    "BimiLogo": {
      "properties": {
        "url": {
          "type": "string",
          "title": "Url"
        },
        "final_url": {
          "type": "string",
          "title": "Final Url"
        },
        "status_code": {
          "type": "integer",
          "title": "Status Code"
        },
        "content_type": {
          "type": "string",
          "title": "Content Type"
        },
        "bytes": {
          "type": "integer",
          "title": "Bytes"
        },
        "sha256": {
          "type": "string",
          "title": "Sha256"
        },
        "base_profile": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Base Profile"
        },
        "version": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Version"
        },
        "title": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Title"
        },
        "view_box": {
          "anyOf": [
            {
              "items": {
                "type": "number"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "View Box"
        },
        "square": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Square"
        },
        "data_uri": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Data Uri",
          "description": "data:image/svg+xml;base64,... for files up to 64 KiB that parse as SVG. Show it only through <img src>, never inline."
        }
      },
      "type": "object",
      "required": [
        "url",
        "final_url",
        "status_code",
        "content_type",
        "bytes",
        "sha256",
        "base_profile",
        "version",
        "title",
        "view_box",
        "square",
        "data_uri"
      ],
      "title": "BimiLogo"
    },
    "BimiSteps": {
      "properties": {
        "dmarc": {
          "type": "string",
          "enum": [
            "pass",
            "warn",
            "fail",
            "error",
            "none",
            "skipped"
          ],
          "title": "Dmarc"
        },
        "record": {
          "type": "string",
          "enum": [
            "pass",
            "warn",
            "fail",
            "error",
            "none",
            "skipped"
          ],
          "title": "Record"
        },
        "logo": {
          "type": "string",
          "enum": [
            "pass",
            "warn",
            "fail",
            "error",
            "none",
            "skipped"
          ],
          "title": "Logo"
        },
        "certificate": {
          "type": "string",
          "enum": [
            "pass",
            "warn",
            "fail",
            "error",
            "none",
            "skipped"
          ],
          "title": "Certificate",
          "description": "\"none\" when the record has no a=."
        }
      },
      "type": "object",
      "required": [
        "dmarc",
        "record",
        "logo",
        "certificate"
      ],
      "title": "BimiSteps"
    },
    "BimiTags": {
      "properties": {
        "v": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "V"
        },
        "l": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "L"
        },
        "a": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "A"
        },
        "avp": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Avp"
        },
        "lps": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Lps"
        }
      },
      "type": "object",
      "title": "BimiTags"
    },
    "Finding": {
      "properties": {
        "code": {
          "type": "string",
          "title": "Code",
          "description": "Stable identifier, e.g. spf.too_many_lookups. The English template for every code is in /i18n/tools/findings.en.json on the website."
        },
        "level": {
          "type": "string",
          "enum": [
            "pass",
            "info",
            "warn",
            "fail",
            "error"
          ],
          "title": "Level"
        },
        "params": {
          "additionalProperties": true,
          "type": "object",
          "title": "Params",
          "description": "Values the message is built from."
        },
        "message": {
          "type": "string",
          "title": "Message",
          "description": "The English sentence, params filled in."
        }
      },
      "type": "object",
      "required": [
        "code",
        "level",
        "params",
        "message"
      ],
      "title": "Finding"
    }
  }
}