{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rdapapi-io/json-schema/rdapapi-io-entity-response-schema.json",
  "title": "EntityResponse",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rdapapi-io-openapi.yaml#/components/schemas/EntityResponse",
  "type": "object",
  "required": [
    "handle",
    "name",
    "organization",
    "email",
    "phone",
    "address",
    "contact_url",
    "country_code",
    "roles",
    "status",
    "dates",
    "remarks",
    "port43",
    "public_ids",
    "entities",
    "autnums",
    "networks"
  ],
  "properties": {
    "handle": {
      "type": [
        "string",
        "null"
      ],
      "description": "Registry-assigned entity handle"
    },
    "name": {
      "type": [
        "string",
        "null"
      ],
      "description": "Full name (fn from vCard)"
    },
    "organization": {
      "type": [
        "string",
        "null"
      ],
      "description": "Organization name"
    },
    "email": {
      "type": [
        "string",
        "null"
      ],
      "description": "Contact email address"
    },
    "phone": {
      "type": [
        "string",
        "null"
      ],
      "description": "Voice telephone number in E.164, with a `;ext=42` suffix when the registry supplies an extension."
    },
    "address": {
      "type": [
        "string",
        "null"
      ],
      "description": "Postal address"
    },
    "contact_url": {
      "type": [
        "string",
        "null"
      ],
      "description": "Web form or page for reaching this contact, where one is published instead of an email address."
    },
    "country_code": {
      "type": [
        "string",
        "null"
      ],
      "description": "ISO 3166-1 alpha-2 country code"
    },
    "roles": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Roles this entity serves"
    },
    "status": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Status codes"
    },
    "dates": {
      "$ref": "#/$defs/Dates"
    },
    "remarks": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Remark"
      }
    },
    "port43": {
      "type": [
        "string",
        "null"
      ],
      "description": "Legacy WHOIS server hostname"
    },
    "public_ids": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PublicId"
      },
      "description": "Public identifiers (e.g. ARIN OrgID, IANA Registrar ID)"
    },
    "entities": {
      "type": "object",
      "description": "Nested contact entities keyed by role",
      "properties": {
        "registrant": {
          "$ref": "#/$defs/Contact"
        },
        "abuse": {
          "$ref": "#/$defs/Contact"
        },
        "administrative": {
          "$ref": "#/$defs/Contact"
        },
        "technical": {
          "$ref": "#/$defs/Contact"
        },
        "billing": {
          "$ref": "#/$defs/Contact"
        }
      }
    },
    "autnums": {
      "type": "array",
      "description": "Autonomous system numbers owned by this entity",
      "items": {
        "$ref": "#/$defs/EntityAutnum"
      }
    },
    "networks": {
      "type": "array",
      "description": "IP network blocks owned by this entity",
      "items": {
        "$ref": "#/$defs/EntityNetwork"
      }
    },
    "redacted": {
      "$ref": "#/$defs/Redaction"
    },
    "meta": {
      "$ref": "#/$defs/Meta"
    }
  },
  "$defs": {
    "Contact": {
      "type": "object",
      "description": "One contact. Any field may be null or withheld.\n",
      "required": [
        "handle",
        "name",
        "organization",
        "email",
        "phone",
        "address",
        "contact_url",
        "country_code"
      ],
      "properties": {
        "handle": {
          "type": [
            "string",
            "null"
          ],
          "description": "Registry handle for this entity"
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "organization": {
          "type": [
            "string",
            "null"
          ]
        },
        "email": {
          "type": [
            "string",
            "null"
          ]
        },
        "phone": {
          "type": [
            "string",
            "null"
          ],
          "description": "Voice telephone number in E.164, with a `;ext=42` suffix when the registry supplies an extension."
        },
        "address": {
          "type": [
            "string",
            "null"
          ]
        },
        "contact_url": {
          "type": [
            "string",
            "null"
          ],
          "description": "Where a server withholds `email` and publishes a web form instead, this carries it."
        },
        "country_code": {
          "type": [
            "string",
            "null"
          ],
          "description": "ISO 3166-1 alpha-2 country code from the address. Unlike the text fields, a redaction placeholder here is dropped to `null` rather than passed through — it is not a country code."
        }
      }
    },
    "Dates": {
      "type": "object",
      "required": [
        "registered",
        "expires",
        "updated"
      ],
      "properties": {
        "registered": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "expires": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "updated": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        }
      }
    },
    "EntityAutnum": {
      "type": "object",
      "required": [
        "handle",
        "name",
        "start_autnum",
        "end_autnum"
      ],
      "properties": {
        "handle": {
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "start_autnum": {
          "type": [
            "integer",
            "null"
          ]
        },
        "end_autnum": {
          "type": [
            "integer",
            "null"
          ]
        }
      }
    },
    "EntityNetwork": {
      "type": "object",
      "required": [
        "handle",
        "name",
        "start_address",
        "end_address",
        "ip_version",
        "cidr"
      ],
      "properties": {
        "handle": {
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "start_address": {
          "type": [
            "string",
            "null"
          ]
        },
        "end_address": {
          "type": [
            "string",
            "null"
          ]
        },
        "ip_version": {
          "type": [
            "string",
            "null"
          ]
        },
        "cidr": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "Meta": {
      "type": "object",
      "description": "Where the answer came from, and how it was served.\n",
      "required": [
        "server",
        "source"
      ],
      "properties": {
        "server": {
          "type": [
            "string",
            "null"
          ],
          "description": "Host that answered, as `/tlds` reports it (usable as `?server=`). May be null on old cached records."
        },
        "source": {
          "type": "string",
          "enum": [
            "rdap",
            "whois"
          ],
          "description": "Which protocol answered. Always `rdap` except on domain lookups, where a TLD with no RDAP server is answered over [WHOIS](#tag/whois-fallback)."
        },
        "rdap_server": {
          "type": "string",
          "deprecated": true,
          "description": "Base URL of the RDAP server, present only when `source` is `rdap`. Use `server` for the host that answered, or `raw_rdap_url` for the exact endpoint queried."
        },
        "raw_rdap_url": {
          "type": "string",
          "description": "Direct URL to the raw RDAP response. Absent when `source` is `whois`, which has no URL form, or when a stored snapshot answered."
        },
        "cached": {
          "type": "boolean",
          "description": "Whether the response was served from cache. Omitted from the partial `meta` of a failed bulk entry."
        },
        "cache_expires": {
          "type": "string",
          "format": "date-time",
          "description": "Cache expiration time (ISO 8601). Omitted from the partial `meta` of a failed bulk entry."
        },
        "followed": {
          "type": "boolean",
          "description": "Whether the registrar's RDAP server was queried for richer data. Only present when `?follow=true` is used and `source` is `rdap`."
        },
        "registrar_rdap_server": {
          "type": [
            "string",
            "null"
          ],
          "description": "URL of the registrar's RDAP record the registry linked to. Only present when `?follow=true` is used."
        },
        "follow_error": {
          "type": [
            "string",
            "null"
          ],
          "description": "Error message if the follow request failed. Only present when `?follow=true` is used and the request fails."
        }
      }
    },
    "PublicId": {
      "type": "object",
      "required": [
        "type",
        "identifier"
      ],
      "properties": {
        "type": {
          "type": [
            "string",
            "null"
          ],
          "description": "Type of public identifier"
        },
        "identifier": {
          "type": [
            "string",
            "null"
          ],
          "description": "The identifier value"
        }
      }
    },
    "Redaction": {
      "type": "object",
      "minProperties": 1,
      "description": "Fields the server declared withheld, at the same path as in the record. See [Redaction](#tag/terminology).\n",
      "properties": {
        "handle": {
          "$ref": "#/$defs/RedactionMethod"
        },
        "registrar": {
          "type": "object",
          "description": "Claims about the top-level `registrar` object. Domain lookups only.",
          "additionalProperties": {
            "$ref": "#/$defs/RedactionMethod"
          }
        },
        "entities": {
          "type": "object",
          "description": "Claims keyed by contact role, then by field within that contact.",
          "additionalProperties": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/$defs/RedactionMethod"
            }
          }
        }
      }
    },
    "RedactionMethod": {
      "type": "string",
      "description": "`removal`, `emptyValue`, `partialValue` or `replacementValue`; see [Redaction](#tag/terminology).\n"
    },
    "Remark": {
      "type": "object",
      "required": [
        "title",
        "description"
      ],
      "properties": {
        "title": {
          "type": [
            "string",
            "null"
          ]
        },
        "description": {
          "type": "string"
        }
      }
    }
  }
}