{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/honkio-ca/json-schema/honkio-ca-contact-schema.json",
  "title": "Contact",
  "description": "A contact: a phone number, an email, or both.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/honkio-ca-contacts-api-openapi.yml#/components/schemas/Contact",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "id",
    "phone_number",
    "email",
    "name",
    "notes",
    "created_at",
    "updated_at"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "phone_number": {
      "type": [
        "string",
        "null"
      ],
      "description": "E.164; null for an email-only contact. Only contacts with a phone can join groups and lists."
    },
    "email": {
      "type": [
        "string",
        "null"
      ],
      "description": "Lower-cased; null for a phone-only contact. At least one of phone_number and email is set."
    },
    "name": {
      "type": [
        "string",
        "null"
      ]
    },
    "notes": {
      "type": [
        "string",
        "null"
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}