{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dns-coffee/json-schema/dns-coffee-domain-records-body-schema.json",
  "title": "DomainRecordsBody",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dns-coffee-domains-api-openapi.yml#/components/schemas/DomainRecordsBody",
  "additionalProperties": false,
  "properties": {
    "$schema": {
      "description": "A URL to the JSON Schema for this object.",
      "format": "uri",
      "readOnly": true,
      "type": "string"
    },
    "archive_records": {
      "description": "Records once present for the name but no longer, up to the requested limit.",
      "items": {
        "$ref": "#/$defs/MiscRecord"
      },
      "type": [
        "array",
        "null"
      ]
    },
    "archive_records_truncated": {
      "description": "True when the name has more archived records than the limit allowed.",
      "type": "boolean"
    },
    "domain": {
      "description": "The queried name.",
      "type": "string"
    },
    "records": {
      "description": "Currently active records for the name, up to the requested limit.",
      "items": {
        "$ref": "#/$defs/MiscRecord"
      },
      "type": [
        "array",
        "null"
      ]
    },
    "records_truncated": {
      "description": "True when the name has more active records than the limit allowed.",
      "type": "boolean"
    }
  },
  "required": [
    "domain",
    "records",
    "archive_records"
  ],
  "type": "object",
  "$defs": {
    "MiscRecord": {
      "additionalProperties": false,
      "properties": {
        "data": {
          "description": "The record's RDATA in zone-file presentation form.",
          "type": "string"
        },
        "first_seen": {
          "description": "Date the record was first observed. Absent when it predates record tracking for its zone (see tracking_since).",
          "format": "date-time",
          "type": "string"
        },
        "last_seen": {
          "description": "Date the record was last observed. Absent while it is still active.",
          "format": "date-time",
          "type": "string"
        },
        "name": {
          "description": "Owner name of the record, lowercase.",
          "type": "string"
        },
        "tracking_since": {
          "description": "Date full-record indexing began for the record's zone; absent when unknown. A record with no first_seen predates this date by an unknown amount.",
          "format": "date-time",
          "type": "string"
        },
        "type": {
          "description": "Numeric RR type.",
          "format": "int64",
          "type": "integer"
        },
        "type_name": {
          "description": "RR type mnemonic (e.g. TXT), or the RFC 3597 TYPE<n> form for a type with no registered name.",
          "type": "string"
        },
        "zone": {
          "description": "Name of the zone the record was observed in; omitted when not populated.",
          "type": "string"
        }
      },
      "required": [
        "name",
        "type",
        "type_name",
        "data"
      ],
      "type": "object"
    }
  }
}