{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://olympiantools.com/schemas/legal-process/v1.json",
  "title": "Legal Process Disclosure File (LPDF), version 1",
  "$comment": "The Legal Process Disclosure Format (LPDF) was designed by Olympian Tools, which maintains this schema and the specification at https://olympiantools.com/legal-process/spec/. Free for any company to publish and any tool to read. (c) 2026 Olympian Tools. Licensed under CC BY 4.0: https://creativecommons.org/licenses/by/4.0/",
  "description": "What a company holds about its users, how long it keeps it, and how law enforcement asks for it, published by the company at /.well-known/legal-process.json. The company is the authority for every value in this file.",
  "type": "object",
  "required": ["spec_version", "file", "provider", "contacts", "service_of_process", "data_categories"],
  "additionalProperties": false,
  "patternProperties": { "^x-": true },
  "properties": {
    "$schema": { "type": "string", "format": "uri", "pattern": "^https://" },
    "spec_version": { "const": "1.0", "description": "The version of this format the file follows." },

    "file": {
      "type": "object",
      "description": "About this file itself: when it was published, reviewed and when it should no longer be trusted.",
      "required": ["published", "last_reviewed", "expires", "canonical_url"],
      "additionalProperties": false,
      "patternProperties": { "^x-": true },
      "properties": {
        "revision": { "type": "string", "description": "The company's own revision label, e.g. \"2026.11.2\"." },
        "published": { "type": "string", "format": "date-time", "description": "When this revision was published." },
        "last_reviewed": { "type": "string", "format": "date-time", "description": "When someone at the company last confirmed every value is current, even if nothing changed." },
        "expires": { "type": "string", "format": "date-time", "description": "After this moment readers must treat the file as unconfirmed. No more than 12 months after last_reviewed." },
        "canonical_url": { "type": "string", "format": "uri", "pattern": "^https://", "description": "Where the authoritative copy lives." },
        "human_readable_guide": { "$ref": "#/$defs/link", "description": "The company's own law enforcement guide that this file mirrors. Where the two disagree the company must say which wins in precedence." },
        "precedence": { "enum": ["this_file", "human_readable_guide"], "description": "Which document controls if they ever disagree." },
        "languages": { "type": "array", "items": { "$ref": "#/$defs/language" }, "minItems": 1, "description": "Languages of the free-text values, BCP 47." },
        "signature_url": { "type": "string", "format": "uri", "pattern": "^https://", "description": "Optional detached JWS (RFC 7515) over the exact bytes of this file." },
        "changelog": {
          "type": "array",
          "description": "What changed, newest first. Keep at least the last 24 months.",
          "items": {
            "type": "object",
            "required": ["date", "summary"],
            "additionalProperties": false,
            "properties": {
              "date": { "type": "string", "format": "date" },
              "revision": { "type": "string" },
              "summary": { "type": "string" },
              "paths": { "type": "array", "items": { "type": "string" }, "description": "JSON Pointers (RFC 6901) to the parts that changed, e.g. \"/data_categories/3/retention\"." }
            }
          }
        }
      }
    },

    "provider": {
      "type": "object",
      "description": "Who the company is and which services this file covers.",
      "required": ["legal_name", "website", "services"],
      "additionalProperties": false,
      "patternProperties": { "^x-": true },
      "properties": {
        "legal_name": { "type": "string" },
        "also_known_as": { "type": "array", "items": { "type": "string" }, "description": "Trade names and brands investigators may search for." },
        "parent_company": { "type": "string" },
        "website": { "type": "string", "format": "uri", "pattern": "^https://" },
        "incorporation": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "country": { "$ref": "#/$defs/country" },
            "region": { "type": "string", "description": "State or province, e.g. \"DE\"." },
            "entity_type": { "type": "string", "description": "e.g. \"corporation\", \"LLC\"." }
          }
        },
        "headquarters": { "$ref": "#/$defs/address" },
        "data_locations": { "type": "array", "items": { "$ref": "#/$defs/country" }, "description": "Countries where user data covered here is stored." },
        "services": {
          "type": "array",
          "minItems": 1,
          "description": "Every product this file covers. Data categories refer to these by id.",
          "items": {
            "type": "object",
            "required": ["id", "name"],
            "additionalProperties": false,
            "patternProperties": { "^x-": true },
            "properties": {
              "id": { "$ref": "#/$defs/id" },
              "name": { "type": "string" },
              "description": { "type": "string" },
              "urls": { "type": "array", "items": { "type": "string", "format": "uri", "pattern": "^https://" } },
              "app_ids": { "type": "array", "items": { "type": "string" }, "description": "Store identifiers, e.g. \"com.example.chat\"." },
              "status": { "enum": ["active", "discontinued"] },
              "discontinued_on": { "type": "string", "format": "date" },
              "operated_by": { "type": "string", "description": "The legal entity that holds this service's data, if not legal_name." }
            }
          }
        }
      }
    },

    "contacts": {
      "type": "array",
      "minItems": 1,
      "description": "Every way to reach the company's law enforcement response team. Other sections refer to these by id.",
      "items": {
        "type": "object",
        "required": ["id", "purposes", "method", "value"],
        "additionalProperties": false,
        "patternProperties": { "^x-": true },
        "properties": {
          "id": { "$ref": "#/$defs/id" },
          "label": { "type": "string" },
          "purposes": {
            "type": "array",
            "minItems": 1,
            "items": { "enum": ["legal_process", "emergency", "preservation", "general_question", "international", "records_custodian", "testimony", "billing", "child_safety", "status_inquiry", "user_notification_questions"] }
          },
          "method": { "enum": ["email", "phone", "fax", "portal", "mail", "courier", "in_person"] },
          "value": { "type": "string", "description": "Address, number (E.164), or URL for the method." },
          "portal_id": { "$ref": "#/$defs/id", "description": "When method is portal: which entry in portals." },
          "available": { "$ref": "#/$defs/hours" },
          "languages": { "type": "array", "items": { "$ref": "#/$defs/language" } },
          "who_may_use": { "type": "string", "description": "e.g. \"Sworn law enforcement and prosecutors only. Not for users or the public.\"" },
          "accepts_service": { "type": "boolean", "description": "Whether sending legal process here counts as service." },
          "notes": { "type": "string" }
        }
      }
    },

    "portals": {
      "type": "array",
      "description": "Online systems for submitting requests or receiving records.",
      "items": {
        "type": "object",
        "required": ["id", "name", "url", "request_types"],
        "additionalProperties": false,
        "patternProperties": { "^x-": true },
        "properties": {
          "id": { "$ref": "#/$defs/id" },
          "name": { "type": "string" },
          "url": { "type": "string", "format": "uri", "pattern": "^https://" },
          "operator": { "type": "string", "description": "If a third party runs it, e.g. a records vendor." },
          "request_types": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/request_type" } },
          "registration": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "required": { "type": "boolean" },
              "url": { "type": "string", "format": "uri", "pattern": "^https://" },
              "eligibility": { "type": "string", "description": "Who can get an account." },
              "requires_government_email": { "type": "boolean" },
              "verification": { "type": "string", "description": "How the company confirms the person, e.g. \"call-back to the agency's published main number\"." },
              "typical_approval_time": { "$ref": "#/$defs/duration" }
            }
          },
          "multi_factor": { "type": "boolean" },
          "uploads": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "formats": { "type": "array", "items": { "type": "string" }, "description": "Media types, e.g. \"application/pdf\"." },
              "max_size_mb": { "type": "number", "minimum": 0 },
              "requires_signed_pdf": { "type": "boolean" }
            }
          },
          "delivers_records": { "type": "boolean", "description": "Whether productions are downloaded from here." },
          "download_window": { "$ref": "#/$defs/duration", "description": "How long a production stays available to download." },
          "status_tracking": { "type": "boolean" },
          "status_page": { "type": "string", "format": "uri", "pattern": "^https://", "description": "Where outages are posted." },
          "agency_accounts": { "type": "boolean", "description": "Whether colleagues can share one agency workspace." },
          "notes": { "type": "string" }
        }
      }
    },

    "service_of_process": {
      "type": "object",
      "description": "How to serve legal process so that it counts.",
      "required": ["accepted_methods"],
      "additionalProperties": false,
      "patternProperties": { "^x-": true },
      "properties": {
        "accepted_methods": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "object",
            "required": ["method"],
            "additionalProperties": false,
            "properties": {
              "method": { "enum": ["portal", "email", "fax", "mail", "courier", "registered_agent", "in_person"] },
              "contact_id": { "$ref": "#/$defs/id" },
              "portal_id": { "$ref": "#/$defs/id" },
              "request_types": { "type": "array", "items": { "$ref": "#/$defs/request_type" }, "description": "If this method is only for some requests." },
              "notes": { "type": "string" }
            }
          }
        },
        "registered_agent": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "name": { "type": "string" },
            "address": { "$ref": "#/$defs/address" },
            "jurisdiction": { "type": "string" }
          }
        },
        "requirements": {
          "type": "array",
          "description": "What every request must carry, in plain words.",
          "items": { "type": "string" },
          "examples": [["On agency letterhead", "Signed by the requesting officer or prosecutor", "A return email address on a government domain"]]
        },
        "out_of_state_process": {
          "type": "object",
          "description": "Whether domestic process from outside the company's home state is honored without domestication.",
          "additionalProperties": false,
          "properties": {
            "accepted": { "type": "boolean" },
            "authority": { "type": "string", "description": "The law the company relies on, as the company states it." },
            "notes": { "type": "string" }
          }
        },
        "will_not_accept": { "type": "array", "items": { "type": "string" }, "description": "e.g. \"Requests sent as links to file-sharing sites\"." },
        "acknowledges_receipt": { "type": "boolean" },
        "typical_response_time": { "$ref": "#/$defs/duration_range" }
      }
    },

    "identifiers": {
      "type": "array",
      "description": "What a request can use to point at an account, and how to write it.",
      "items": {
        "type": "object",
        "required": ["type"],
        "additionalProperties": false,
        "patternProperties": { "^x-": true },
        "properties": {
          "type": { "$ref": "#/$defs/identifier_type" },
          "label": { "type": "string", "description": "What the company calls it, e.g. \"User ID\"." },
          "services": { "$ref": "#/$defs/service_refs" },
          "format": { "type": "string", "description": "How to write it, e.g. \"E.164 with country code\"." },
          "pattern": { "type": "string", "format": "regex", "description": "Optional regular expression a valid value matches." },
          "where_to_find": { "type": "string", "description": "e.g. \"Shown on the profile page after /u/\"." },
          "must_include": { "type": "array", "items": { "type": "string" }, "description": "e.g. for IP addresses: \"timestamp with timezone\", \"source port\"." },
          "uniquely_identifies": { "type": "boolean", "description": "False when many accounts can share it, e.g. display names." },
          "notes": { "type": "string" }
        }
      }
    },

    "data_categories": {
      "type": "array",
      "minItems": 1,
      "description": "Every kind of record the company holds, how long it keeps it and what process gets it.",
      "items": { "$ref": "#/$defs/data_category" }
    },

    "preservation": {
      "type": "object",
      "additionalProperties": false,
      "patternProperties": { "^x-": true },
      "required": ["accepted"],
      "properties": {
        "accepted": { "type": "boolean" },
        "authority": { "type": "string", "description": "e.g. \"18 U.S.C. § 2703(f)\"." },
        "how_to_request": { "type": "array", "items": { "$ref": "#/$defs/channel" } },
        "initial_period": { "$ref": "#/$defs/duration" },
        "extensions": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "allowed": { "type": "boolean" },
            "period": { "$ref": "#/$defs/duration" },
            "max_count": { "type": "integer", "minimum": 0 },
            "how": { "type": "string" }
          }
        },
        "scope": { "type": "string", "description": "What a preservation captures, e.g. \"a snapshot of the account as of the time the request is processed; it does not capture data created afterward\"." },
        "confirmation_sent": { "type": "boolean" },
        "reference_format": { "type": "string", "description": "What the confirmation number looks like, so it can be quoted later." },
        "notifies_user": { "type": "boolean" },
        "notes": { "type": "string" }
      }
    },

    "emergency_requests": {
      "type": "object",
      "additionalProperties": false,
      "patternProperties": { "^x-": true },
      "required": ["accepted"],
      "properties": {
        "accepted": { "type": "boolean" },
        "authority": { "type": "string", "description": "e.g. \"18 U.S.C. § 2702(b)(8) and (c)(4)\"." },
        "criteria": { "type": "string", "description": "The company's own words on what qualifies." },
        "how_to_request": { "type": "array", "items": { "$ref": "#/$defs/channel" } },
        "form_url": { "type": "string", "format": "uri", "pattern": "^https://" },
        "available": { "$ref": "#/$defs/hours" },
        "must_include": { "type": "array", "items": { "type": "string" } },
        "follow_up_process_required": { "type": "boolean", "description": "Whether formal process is expected afterward." },
        "typical_response_time": { "$ref": "#/$defs/duration_range" },
        "notes": { "type": "string" }
      }
    },

    "user_notification": {
      "type": "object",
      "additionalProperties": false,
      "patternProperties": { "^x-": true },
      "required": ["policy"],
      "properties": {
        "policy": { "enum": ["notifies_by_default", "does_not_notify", "case_by_case"] },
        "statement": { "type": "string", "description": "The company's own words." },
        "notice_before_disclosure": { "$ref": "#/$defs/duration", "description": "How long before production the user is told, if they are." },
        "honors_nondisclosure_orders": { "type": "boolean" },
        "nondisclosure_authority": { "type": "string", "description": "e.g. \"18 U.S.C. § 2705(b)\"." },
        "honors_delay_requests_without_order": { "type": "boolean" },
        "max_voluntary_delay": { "$ref": "#/$defs/duration" },
        "notifies_after_order_expires": { "type": "boolean" },
        "exceptions": { "type": "array", "items": { "type": "string" } }
      }
    },

    "international_requests": {
      "type": "object",
      "additionalProperties": false,
      "patternProperties": { "^x-": true },
      "properties": {
        "direct_requests_accepted_from": { "type": "array", "items": { "$ref": "#/$defs/country" } },
        "mlat_required_for": { "type": "array", "items": { "type": "string" }, "description": "Which data needs a mutual legal assistance request." },
        "executive_agreements": { "type": "array", "items": { "type": "string" }, "description": "e.g. CLOUD Act agreements the company honors." },
        "contact_ids": { "$ref": "#/$defs/contact_refs" },
        "notes": { "type": "string" }
      }
    },

    "productions": {
      "type": "object",
      "description": "What records arrive as, and how to authenticate them in court.",
      "additionalProperties": false,
      "patternProperties": { "^x-": true },
      "properties": {
        "delivery_methods": { "type": "array", "items": { "enum": ["portal_download", "email", "encrypted_email", "physical_media", "mail", "sftp"] } },
        "formats": { "type": "array", "items": { "type": "string" }, "description": "Media types, e.g. \"text/csv\"." },
        "encryption": { "type": "string" },
        "timestamps": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "timezone": { "type": "string", "description": "IANA zone or \"UTC\"." },
            "format": { "type": "string", "description": "e.g. \"ISO 8601\"." }
          }
        },
        "field_dictionary_url": { "type": "string", "format": "uri", "pattern": "^https://", "description": "Explains every column in a production." },
        "hash_algorithm": { "type": "string", "description": "e.g. \"SHA-256\"." },
        "custodian_certification": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "included_by_default": { "type": "boolean" },
            "available_on_request": { "type": "boolean" },
            "authority": { "type": "string", "description": "e.g. \"Federal Rules of Evidence 902(11)\"." },
            "contact_id": { "$ref": "#/$defs/id" }
          }
        },
        "testimony": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "available": { "type": "boolean" },
            "remote_available": { "type": "boolean" },
            "notice_needed": { "$ref": "#/$defs/duration" },
            "contact_id": { "$ref": "#/$defs/id" }
          }
        }
      }
    },

    "costs": {
      "type": "object",
      "additionalProperties": false,
      "patternProperties": { "^x-": true },
      "properties": {
        "charges_fees": { "type": "boolean" },
        "authority": { "type": "string", "description": "e.g. \"18 U.S.C. § 2706\"." },
        "waived_for": { "type": "array", "items": { "type": "string" } },
        "fee_schedule": { "$ref": "#/$defs/link" },
        "billing_contact_id": { "$ref": "#/$defs/id" }
      }
    },

    "things_we_cannot_provide": {
      "type": "array",
      "description": "Common requests the company can never fulfil, so nobody waits for them. E.g. end-to-end encrypted message content.",
      "items": {
        "type": "object",
        "required": ["what", "why"],
        "additionalProperties": false,
        "properties": {
          "what": { "type": "string" },
          "why": { "enum": ["not_collected", "end_to_end_encrypted", "deleted", "held_by_another_company", "technically_unavailable", "legally_prohibited", "other"] },
          "services": { "$ref": "#/$defs/service_refs" },
          "ask_instead": { "type": "string", "description": "e.g. \"the carrier\", or another company that holds it." },
          "notes": { "type": "string" }
        }
      }
    },

    "links": {
      "type": "object",
      "description": "Other published pages an investigator may want.",
      "additionalProperties": { "$ref": "#/$defs/link" },
      "properties": {
        "law_enforcement_guide": { "$ref": "#/$defs/link" },
        "privacy_policy": { "$ref": "#/$defs/link" },
        "data_retention_policy": { "$ref": "#/$defs/link" },
        "transparency_report": { "$ref": "#/$defs/link" },
        "terms_of_service": { "$ref": "#/$defs/link" },
        "emergency_form": { "$ref": "#/$defs/link" },
        "security_txt": { "$ref": "#/$defs/link" }
      }
    }
  },

  "$defs": {
    "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9_-]{0,62}$", "description": "Lowercase letters, digits, - and _. Unique within its list." },
    "service_refs": { "type": "array", "items": { "$ref": "#/$defs/id" }, "description": "Service ids from provider.services. Omitted means every service." },
    "contact_refs": { "type": "array", "items": { "$ref": "#/$defs/id" } },
    "language": { "type": "string", "pattern": "^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$" },
    "country": { "type": "string", "pattern": "^[A-Z]{2}$", "description": "ISO 3166-1 alpha-2." },
    "duration": {
      "type": "string",
      "pattern": "^P(?!$)(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+S)?)?$",
      "description": "ISO 8601 duration, e.g. P90D, P1Y, PT24H."
    },
    "duration_range": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "min": { "$ref": "#/$defs/duration" },
        "typical": { "$ref": "#/$defs/duration" },
        "max": { "$ref": "#/$defs/duration" },
        "notes": { "type": "string" }
      }
    },
    "link": {
      "type": "object",
      "required": ["url"],
      "additionalProperties": false,
      "properties": {
        "url": { "type": "string", "format": "uri", "pattern": "^https://" },
        "title": { "type": "string" },
        "language": { "$ref": "#/$defs/language" },
        "last_updated": { "type": "string", "format": "date" }
      }
    },
    "address": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "attention": { "type": "string" },
        "lines": { "type": "array", "items": { "type": "string" }, "minItems": 1 },
        "locality": { "type": "string" },
        "region": { "type": "string" },
        "postal_code": { "type": "string" },
        "country": { "$ref": "#/$defs/country" }
      }
    },
    "hours": {
      "type": "object",
      "description": "When a contact is staffed.",
      "additionalProperties": false,
      "properties": {
        "always": { "type": "boolean", "description": "Staffed around the clock, every day." },
        "timezone": { "type": "string", "description": "IANA zone, e.g. America/Los_Angeles." },
        "schedule": {
          "type": "array",
          "items": {
            "type": "object",
            "required": ["days", "opens", "closes"],
            "additionalProperties": false,
            "properties": {
              "days": { "type": "array", "items": { "enum": ["mon", "tue", "wed", "thu", "fri", "sat", "sun"] }, "minItems": 1 },
              "opens": { "type": "string", "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$" },
              "closes": { "type": "string", "pattern": "^([01]\\d|2[0-4]):[0-5]\\d$" }
            }
          }
        },
        "closed_on_holidays": { "type": "boolean" },
        "notes": { "type": "string" }
      }
    },
    "channel": {
      "type": "object",
      "description": "One way to send something: a contact or a portal.",
      "additionalProperties": false,
      "properties": {
        "contact_id": { "$ref": "#/$defs/id" },
        "portal_id": { "$ref": "#/$defs/id" },
        "notes": { "type": "string" }
      },
      "anyOf": [{ "required": ["contact_id"] }, { "required": ["portal_id"] }]
    },
    "request_type": {
      "enum": ["legal_process", "preservation", "preservation_extension", "emergency", "status_inquiry", "nondisclosure_order", "records_custodian", "testimony", "international", "withdrawal"]
    },
    "identifier_type": {
      "enum": ["phone_number", "email_address", "username", "account_id", "display_name", "profile_url", "ip_address", "device_id", "imei", "imsi", "iccid", "meid", "mac_address", "advertising_id", "payment_instrument", "transaction_id", "order_id", "wallet_address", "content_id", "content_url", "vehicle_vin", "license_plate", "subscriber_name", "other"]
    },
    "process_type": {
      "enum": ["consent", "subpoena", "grand_jury_subpoena", "administrative_subpoena", "court_order", "search_warrant", "pen_register_trap_trace", "wiretap_order", "emergency_request", "national_security_process", "mlat", "executive_agreement", "foreign_direct_request", "other"],
      "description": "The kind of process. Its exact legal basis goes in authority, in the company's own words."
    },
    "retention": {
      "type": "object",
      "description": "How long a kind of record is kept, as the company states it.",
      "required": ["kind"],
      "additionalProperties": false,
      "properties": {
        "kind": {
          "enum": ["fixed", "up_to", "at_least", "approximately", "while_account_active", "until_user_deletes", "user_configurable", "varies", "not_retained", "unknown"],
          "description": "fixed: deleted when the period ends. up_to: may be gone sooner. at_least: may be kept longer. varies: explain in statement."
        },
        "period": { "$ref": "#/$defs/duration", "description": "Required for fixed, up_to, at_least and approximately." },
        "starts_from": { "enum": ["creation", "event", "last_activity", "account_closure", "user_deletion", "other"], "description": "When the clock starts." },
        "after_user_deletes": {
          "type": "object",
          "description": "What happens when the user deletes the item themselves.",
          "additionalProperties": false,
          "properties": {
            "recoverable_for": { "$ref": "#/$defs/duration" },
            "kind": { "enum": ["immediately_unrecoverable", "recoverable_for_period", "kept_for_period", "unknown"] },
            "notes": { "type": "string" }
          }
        },
        "after_account_closure": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "kind": { "enum": ["deleted_immediately", "deleted_after_period", "kept_for_period", "some_kept", "unknown"] },
            "period": { "$ref": "#/$defs/duration" },
            "notes": { "type": "string" }
          }
        },
        "user_controls": { "type": "string", "description": "e.g. \"Users can set messages to disappear after 24 hours or 7 days\"." },
        "statement": { "type": "string", "description": "The company's exact words, for anything the fields above can't carry." },
        "effective_from": { "type": "string", "format": "date", "description": "When this period took effect. Periods change; this lets a reader judge records from before." },
        "previous": {
          "type": "array",
          "description": "Periods that applied before effective_from, newest first, so older records can be judged.",
          "items": {
            "type": "object",
            "required": ["until", "kind"],
            "additionalProperties": false,
            "properties": {
              "until": { "type": "string", "format": "date" },
              "kind": { "type": "string" },
              "period": { "$ref": "#/$defs/duration" },
              "statement": { "type": "string" }
            }
          }
        }
      },
      "allOf": [
        { "if": { "properties": { "kind": { "enum": ["fixed", "up_to", "at_least", "approximately"] } } }, "then": { "required": ["period"] } },
        { "if": { "properties": { "kind": { "const": "varies" } } }, "then": { "required": ["statement"] } }
      ]
    },
    "process_rule": {
      "type": "object",
      "description": "One kind of process that gets this data, and any conditions.",
      "required": ["process"],
      "additionalProperties": false,
      "properties": {
        "process": { "$ref": "#/$defs/process_type" },
        "authority": { "type": "string", "description": "The legal basis as the company states it, e.g. \"18 U.S.C. § 2703(c)(2)\"." },
        "jurisdictions": { "type": "array", "items": { "type": "string" }, "description": "Where this rule applies, e.g. \"US\", \"US-CA\", \"GB\". Omitted means everywhere the company accepts process." },
        "conditions": { "type": "string", "description": "e.g. \"Only for the 90 days before the request\"." },
        "returns": { "type": "string", "description": "When the process gets only part of the category, what it gets." }
      }
    },
    "data_category": {
      "type": "object",
      "required": ["id", "name", "retention", "obtainable_with"],
      "additionalProperties": false,
      "patternProperties": { "^x-": true },
      "properties": {
        "id": { "$ref": "#/$defs/id" },
        "name": { "type": "string" },
        "group": { "enum": ["subscriber", "transactional", "content", "location", "device", "financial", "connection_logs", "communications_metadata", "safety_reports", "other"], "description": "The broad kind, roughly following how U.S. law groups records." },
        "description": { "type": "string" },
        "fields": { "type": "array", "items": { "type": "string" }, "description": "What a production of this category contains, e.g. \"name\", \"signup IP address\"." },
        "services": { "$ref": "#/$defs/service_refs" },
        "searchable_by": { "type": "array", "items": { "$ref": "#/$defs/identifier_type" } },
        "collected": { "enum": ["always", "if_user_provides", "if_feature_used", "if_enabled_by_user"] },
        "verified": { "type": "boolean", "description": "Whether the company checks it is true, e.g. a phone number confirmed by text." },
        "retention": { "$ref": "#/$defs/retention" },
        "obtainable_with": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/process_rule" }, "description": "Every kind of process that gets this data. If any process gets it, list the least that does." },
        "available_prospectively": { "type": "boolean", "description": "Whether it can be collected going forward under a court order, not only historically." },
        "production_formats": { "type": "array", "items": { "type": "string" } },
        "typical_response_time": { "$ref": "#/$defs/duration_range" },
        "limitations": { "type": "string", "description": "e.g. \"Location is approximate, derived from IP address\"." },
        "notes": { "type": "string" },
        "last_reviewed": { "type": "string", "format": "date", "description": "When this category was last confirmed, if more recent than the file." }
      }
    }
  }
}
