{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/karbonhq/json-schema/karbonhq-custom-field-definitions-schema.json",
  "title": "CustomFieldDefinitions",
  "description": "A list of the available custom fields in Karbon",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/karbonhq-custom-fields-api-openapi.yml#/components/schemas/CustomFieldDefinitions",
  "type": "object",
  "properties": {
    "@odata.context": {
      "type": "string"
    },
    "@odata.count": {
      "type": "number",
      "format": "int32"
    },
    "value": {
      "type": "array",
      "items": {
        "allOf": [
          {
            "type": "object",
            "properties": {
              "Key": {
                "type": "string",
                "required": true
              }
            }
          },
          {
            "$ref": "#/$defs/CustomFieldDefinition"
          }
        ]
      }
    }
  },
  "$defs": {
    "CustomFieldDefinition": {
      "type": "object",
      "description": "The structure that defines a Custom Field in Karbon",
      "properties": {
        "Name": {
          "type": "string",
          "maxLength": 100
        },
        "Type": {
          "type": "string",
          "enum": [
            "Text",
            "Number",
            "Date",
            "Boolean",
            "Colleague",
            "ListSingleSelect",
            "ListMultipleSelect"
          ]
        },
        "IsVisibleToContacts": {
          "type": "boolean"
        },
        "IsVisibleToOrganizations": {
          "type": "boolean"
        },
        "ListOptions": {
          "descriptions": "A value or values assigned to the Custom Field, note that all values for all types are strings - this includes `number` and `boolean` types",
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 256
          }
        }
      }
    }
  }
}