{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/honkio-ca/json-schema/honkio-ca-contact-list-schema.json",
  "title": "ContactList",
  "description": "An allow/deny contact list with every entry embedded. Assign it to an API key to restrict who that key may message.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/honkio-ca-lists-api-openapi.yml#/components/schemas/ContactList",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "id",
    "name",
    "description",
    "entry_count",
    "entries",
    "created_at",
    "updated_at"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "entry_count": {
      "type": "integer"
    },
    "entries": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true,
        "required": [
          "id",
          "phone_number",
          "contact_id",
          "contact_group_id",
          "contact_name",
          "contact_phone",
          "group_name",
          "added_at"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "phone_number": {
            "type": [
              "string",
              "null"
            ],
            "description": "Set on a direct number entry."
          },
          "contact_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Set on a contact entry."
          },
          "contact_group_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Set on a group entry, which expands to the group's members at send time."
          },
          "contact_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "contact_phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "group_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "added_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      }
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}