{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/commsharbor/json-schema/commsharbor-verificacao-avulsa-schema.json",
  "title": "VerificacaoAvulsa",
  "description": "The email security audit of one domain, paid per call: the fields of `GET /api/email-check`.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/commsharbor-x402-api-openapi.yml#/components/schemas/VerificacaoAvulsa",
  "type": "object",
  "properties": {
    "domain": {
      "type": "string",
      "description": "Registrable domain that was checked."
    },
    "score": {
      "type": "integer",
      "description": "0 to 100: DMARC up to 40, SPF 20, DKIM 20, MX 10, MTA-STS 5 and BIMI 5."
    },
    "rating": {
      "type": "string",
      "description": "protected (90+), good (70+), at_risk (40+) or exposed."
    },
    "findings": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "`{code, severity}`, most severe first. Codes: dmarc_missing, dmarc_none, spf_plus_all, spf_missing, spf_multiple, dmarc_quarantine, dkim_not_found, spf_neutral, spf_softfail, dmarc_no_reports, mx_missing, mta_sts_missing, bimi_missing."
    },
    "spf": {
      "type": "object",
      "description": "`{record, ending, multiple}`: the first SPF record, its `all` ending and whether there are two."
    },
    "dmarc": {
      "type": "object",
      "description": "`{record, policy, reports}`: policy reject, quarantine, none or null; reports when `rua` is set."
    },
    "dkim": {
      "type": "object",
      "description": "`{found, checked}`: selectors with a published key and the selectors looked up."
    },
    "mx": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "MX records as `priority host`."
    },
    "mta_sts": {
      "type": "boolean",
      "description": "An MTA-STS policy record exists."
    },
    "bimi": {
      "type": "boolean",
      "description": "A BIMI record exists at the default selector."
    },
    "unread": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Parts whose DNS query failed (spf, dmarc, dkim, mx, mta_sts, bimi). They have no findings and no points."
    },
    "incomplete": {
      "type": "boolean",
      "description": "At least one DNS query failed."
    },
    "checked_at": {
      "type": "string",
      "description": "ISO time of the DNS reading."
    },
    "share_url": {
      "type": "string",
      "description": "Public page with this result."
    },
    "badge_url": {
      "type": "string",
      "description": "SVG badge with the score."
    },
    "cobranca": {
      "allOf": [
        {
          "$ref": "#/$defs/CobrancaDaChamada"
        }
      ],
      "description": "How this call was paid."
    }
  },
  "required": [
    "domain",
    "score",
    "rating",
    "findings",
    "spf",
    "dmarc",
    "dkim",
    "mx",
    "mta_sts",
    "bimi",
    "unread",
    "incomplete",
    "checked_at",
    "share_url",
    "badge_url",
    "cobranca"
  ],
  "$defs": {
    "CobrancaDaChamada": {
      "type": "object",
      "properties": {
        "via": {
          "type": "string",
          "description": "`x402`, `credito` or the marketplace that already charged the call."
        },
        "preco_usd": {
          "type": "string",
          "description": "The price charged for this call in US dollars, such as `0.01`: at least US$ 0.01 with single x402 payment; the unit price with credit."
        },
        "repetido": {
          "type": "boolean",
          "description": "`true` when the credit had already paid this request (the same `Idempotency-Key`): nothing was charged again."
        },
        "saldo_usd": {
          "type": "string",
          "description": "The credit balance after the call, such as `$0.99`; includes payment from the account balance."
        }
      },
      "required": [
        "via",
        "preco_usd",
        "repetido"
      ],
      "description": "The payment of a single call."
    }
  }
}