{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dialogbrain-com/json-schema/dialogbrain-com-person-detail-response-schema.json",
  "title": "PersonDetailResponse",
  "description": "Detailed person response with all entities.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dialogbrain-com-contacts-api-openapi.yml#/components/schemas/PersonDetailResponse",
  "properties": {
    "id": {
      "type": "integer",
      "title": "Id"
    },
    "display_name": {
      "type": "string",
      "title": "Display Name"
    },
    "avatar_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Avatar Url"
    },
    "normalized_phone": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Normalized Phone"
    },
    "normalized_email": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Normalized Email"
    },
    "canonical_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Canonical Name"
    },
    "entity_count": {
      "type": "integer",
      "title": "Entity Count",
      "default": 0
    },
    "channels": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Channels",
      "default": []
    },
    "created_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Created At"
    },
    "updated_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Updated At"
    },
    "entities": {
      "items": {
        "$ref": "#/$defs/EntitySummary"
      },
      "type": "array",
      "title": "Entities",
      "default": []
    },
    "threads": {
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "type": "array",
      "title": "Threads",
      "default": []
    },
    "staff_role": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Staff Role"
    },
    "capabilities": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Capabilities",
      "default": []
    },
    "notes": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Notes"
    },
    "preferred_channel_account_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Preferred Channel Account Id"
    }
  },
  "type": "object",
  "required": [
    "id",
    "display_name"
  ],
  "$defs": {
    "EntitySummary": {
      "properties": {
        "id": {
          "type": "integer",
          "title": "Id"
        },
        "channel": {
          "type": "string",
          "title": "Channel"
        },
        "channel_ref": {
          "type": "string",
          "title": "Channel Ref"
        },
        "title": {
          "type": "string",
          "title": "Title"
        },
        "username": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Username"
        },
        "avatar_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Avatar Url"
        },
        "is_bot": {
          "type": "boolean",
          "title": "Is Bot",
          "default": false
        }
      },
      "type": "object",
      "required": [
        "id",
        "channel",
        "channel_ref",
        "title"
      ],
      "title": "EntitySummary",
      "description": "Summary of an entity linked to a person."
    }
  }
}