{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/france-identite/json-schema/france-identite-domain-proof-schema.json",
  "title": "DomainProof",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/france-identite-organisation-openapi.yml#/components/schemas/DomainProof",
  "type": "object",
  "required": [
    "domain",
    "status"
  ],
  "properties": {
    "domain": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "not-started",
        "pending",
        "proven",
        "expired"
      ]
    },
    "token": {
      "type": "string"
    },
    "wellKnown": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string"
        },
        "content": {
          "type": "string"
        }
      }
    },
    "dns": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "TXT"
          ]
        },
        "value": {
          "type": "string"
        }
      }
    },
    "provenAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "validUntil": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "method": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "well-known",
        "dns",
        null
      ]
    },
    "lastCheckedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "lastFailure": {
      "type": [
        "array",
        "null"
      ],
      "description": "What the last check found at each place when it did not find the token; null once proven or never checked.",
      "items": {
        "type": "object",
        "required": [
          "where",
          "code"
        ],
        "properties": {
          "where": {
            "type": "string",
            "enum": [
              "well-known",
              "dns"
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "token_absent",
              "http_status",
              "no_record",
              "not_found",
              "private_address",
              "too_large",
              "timeout",
              "tls",
              "unreachable"
            ]
          },
          "status": {
            "type": "integer",
            "description": "The HTTP status",
            "with `http_status`.": null
          }
        }
      }
    },
    "services": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Your services that name this domain."
    }
  }
}