{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/knoxcall/json-schema/knoxcall-client-schema.json",
  "title": "Client",
  "description": "An authorized client (user or server) with IP-based access control.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/knoxcall-clients-api-openapi.yml#/components/schemas/Client",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string",
      "description": "Human-readable name for the client."
    },
    "type": {
      "type": "string",
      "enum": [
        "user",
        "server"
      ],
      "description": "Client type -- `user` for individual users, `server` for backend services."
    },
    "ip_address": {
      "type": "string",
      "description": "IP address, CIDR range, or IP range authorized for this client."
    },
    "ip_notes": {
      "type": "object",
      "additionalProperties": true,
      "description": "Notes about the IP address configuration, keyed by IP."
    },
    "description": {
      "type": [
        "string",
        "null"
      ],
      "description": "Optional description of the client."
    },
    "enabled": {
      "type": "boolean",
      "description": "Whether the client is active."
    },
    "collection_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "Collection this client belongs to, if any."
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}