{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/instasent/json-schema/instasent-attribute-spec-schema.json",
  "title": "AttributeSpec",
  "description": "Project attribute specification",
  "x-generated": "2026-10-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/product.openapi.yaml#/components/schemas/AttributeSpec",
  "type": "object",
  "properties": {
    "uid": {
      "type": "string",
      "description": "The attribute identifier (e.g., '_full_name', '_user_id')"
    },
    "adhocUid": {
      "type": [
        "string",
        "null"
      ],
      "description": "Ad-hoc attribute identifier (if applicable)"
    },
    "label": {
      "type": [
        "string",
        "null"
      ],
      "description": "The attribute's human label, ready to read and to show. **Use this one.**\nFalls back to the attribute's uid when no label is set.\n"
    },
    "displayLabel": {
      "type": "string",
      "description": "The raw stored label, which for built-in attributes carries the panel's\ntranslation markers (`<XLT>...</XLT>`). It exists for the panel, which\nowns the translation dictionary. Every other reader wants `label`:\nshowing or narrating this value leaks markup to the end user.\n"
    },
    "description": {
      "type": "string",
      "description": "Localized description of the attribute"
    },
    "dataType": {
      "type": "string",
      "description": "The data type (e.g., 'string', 'number', 'boolean', 'date')"
    },
    "visualType": {
      "type": "string",
      "description": "The visual representation type"
    },
    "enabled": {
      "type": "boolean",
      "description": "Whether the attribute is enabled for use"
    },
    "readonly": {
      "type": "boolean",
      "description": "Whether the attribute is read-only"
    },
    "visible": {
      "type": "boolean",
      "description": "Whether the attribute is visible in the UI"
    },
    "unique": {
      "type": "boolean",
      "description": "Whether the attribute is unique (used for merging contacts)"
    },
    "custom": {
      "type": "boolean",
      "description": "Whether the attribute is custom (user-created)"
    },
    "internal": {
      "type": "boolean",
      "description": "Whether the attribute is internal-only"
    },
    "multivalue": {
      "type": "integer",
      "description": "Maximum number of values allowed (1 = single value)"
    },
    "mappeable": {
      "type": "boolean",
      "description": "Whether the attribute can be mapped from datasources"
    },
    "eventBased": {
      "type": "boolean",
      "description": "Whether the attribute is derived from events"
    },
    "important": {
      "type": "boolean",
      "description": "Whether the attribute is marked as important"
    },
    "createdByDatasourceType": {
      "type": [
        "string",
        "null"
      ],
      "description": "Type of datasource that created this attribute (if applicable)"
    },
    "createdByDatasourceUid": {
      "type": [
        "string",
        "null"
      ],
      "description": "UID of datasource that created this attribute (if applicable)"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "When the attribute was created"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "When the attribute was last updated"
    }
  },
  "required": [
    "uid",
    "displayLabel",
    "dataType",
    "visualType",
    "enabled",
    "readonly",
    "visible",
    "unique",
    "custom",
    "internal",
    "multivalue",
    "mappeable",
    "eventBased"
  ],
  "x-stoplight": {
    "id": "attribute-spec"
  }
}