{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/benchling/main/json-schema/benchling-entry-template-schema.json",
  "title": "EntryTemplate",
  "description": "Entry templates are templates that users can base new notebook entries off of.\n",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/benchling-entries-api-openapi.yml#/components/schemas/EntryTemplate",
  "additionalProperties": false,
  "properties": {
    "apiURL": {
      "description": "The canonical url of the Entry Template in the API.",
      "format": "uri",
      "readOnly": true,
      "type": "string"
    },
    "createdAt": {
      "description": "DateTime the template was created at",
      "format": "date-time",
      "readOnly": true,
      "type": "string"
    },
    "creator": {
      "allOf": [
        {
          "$ref": "#/$defs/UserSummary"
        }
      ],
      "description": "UserSummary Resource of the user who created the template",
      "readOnly": true
    },
    "customFields": {
      "$ref": "#/$defs/CustomFields"
    },
    "days": {
      "description": "Array of day objects. Each day object has a day index (integer) and notes field (array of notes, expand further for details on note types).\n",
      "items": {
        "$ref": "#/$defs/EntryTemplateDay"
      },
      "type": "array"
    },
    "fields": {
      "$ref": "#/$defs/Fields"
    },
    "id": {
      "description": "ID of the entry template",
      "type": "string"
    },
    "modifiedAt": {
      "description": "DateTime the template was last modified",
      "type": "string"
    },
    "name": {
      "description": "Title of the template",
      "type": "string"
    },
    "schema": {
      "allOf": [
        {
          "$ref": "#/$defs/EntrySchema"
        }
      ],
      "description": "Entry schema if set",
      "title": "SchemaProperty",
      "type": [
        "object",
        "null"
      ]
    },
    "templateCollectionId": {
      "description": "ID of the collection that contains the template",
      "type": "string"
    },
    "webURL": {
      "description": "URL of the template",
      "type": "string"
    }
  },
  "type": "object",
  "$defs": {
    "AppCanvasNotePart": {
      "allOf": [
        {
          "$ref": "#/$defs/BaseNotePart"
        },
        {
          "properties": {
            "appId": {
              "description": "The API identifier for the Benchling App.",
              "type": "string"
            },
            "canvasId": {
              "description": "The API identifier for this Analysis Chart.",
              "type": "string"
            },
            "featureId": {
              "description": "The developer ID assigned to the feature of this App Canvas.",
              "type": "string"
            },
            "type": {
              "enum": [
                "app_canvas"
              ],
              "type": "string"
            }
          }
        }
      ]
    },
    "AssayRunNotePart": {
      "allOf": [
        {
          "$ref": "#/$defs/BaseNotePart"
        },
        {
          "properties": {
            "assayRunId": {
              "type": [
                "string",
                "null"
              ]
            },
            "assayRunSchemaId": {
              "type": "string"
            },
            "type": {
              "enum": [
                "assay_run"
              ],
              "type": "string"
            }
          },
          "type": "object"
        }
      ]
    },
    "BaseNotePart": {
      "properties": {
        "indentation": {
          "default": 0,
          "description": "All notes have an indentation level - the default is 0 for no indent. For lists, indentation gives notes hierarchy - a bulleted list with children is modeled as one note part with indentation 1 followed by note parts with indentation 2, for example.",
          "minimum": 0,
          "type": "integer"
        },
        "type": {
          "description": "The type of the note.  Type determines what other fields are present.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "BoxCreationTableNotePart": {
      "allOf": [
        {
          "$ref": "#/$defs/BaseNotePart"
        },
        {
          "$ref": "#/$defs/StructuredTableApiIdentifiers"
        },
        {
          "properties": {
            "boxSchemaId": {
              "type": "string"
            },
            "type": {
              "enum": [
                "box_creation_table"
              ],
              "type": "string"
            }
          },
          "type": "object"
        }
      ]
    },
    "ChartNotePart": {
      "allOf": [
        {
          "$ref": "#/$defs/BaseNotePart"
        },
        {
          "properties": {
            "chart": {
              "description": "The full configuration for the chart to be displayed in-line in this note part.",
              "properties": {
                "id": {
                  "description": "The API identifier for this Analysis Chart.",
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": {
              "enum": [
                "note_linked_chart"
              ],
              "type": "string"
            }
          },
          "type": "object"
        }
      ]
    },
    "CheckboxNotePart": {
      "allOf": [
        {
          "$ref": "#/$defs/BaseNotePart"
        },
        {
          "properties": {
            "checked": {
              "description": "Indicates whether the checkbox is checked or not.\n",
              "type": "boolean"
            },
            "links": {
              "description": "Array of links referenced in text via an @-mention, hyperlink, or the drag-n-dropped preview attached to the note.\n",
              "items": {
                "$ref": "#/$defs/EntryLink"
              },
              "type": "array"
            },
            "text": {
              "description": "The textual contents of the note.",
              "type": "string"
            },
            "type": {
              "enum": [
                "list_checkbox"
              ],
              "type": "string"
            }
          },
          "type": "object"
        }
      ],
      "description": "One \"line\" of a checklist"
    },
    "CustomField": {
      "properties": {
        "value": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "CustomFields": {
      "additionalProperties": {
        "$ref": "#/$defs/CustomField"
      },
      "type": "object"
    },
    "EntryLink": {
      "description": "Links are contained within notes to reference resources that live outside of the entry. A link can target an external resource via an http(s):// hyperlink or a Benchling resource via @-mentions and drag-n-drop.\n",
      "properties": {
        "id": {
          "description": "For linked Benchling resources, this will be the ID of that resource (e.g., 'seq_RhYGVnHF'). Omitted for \"link\" types.\n",
          "type": "string"
        },
        "type": {
          "description": "The type of resource being linked. For hyperlinks: 'link'. For linked Benchling resources, one of: 'user', 'request', 'entry', 'stage_entry', 'protocol', 'workflow', 'custom_entity', 'aa_sequence', 'dna_sequence', 'batch', 'box', 'container', 'location', 'plate', 'sql_dashboard'; and (for legacy support) 'insights_dashboard', 'folder'.\n",
          "enum": [
            "link",
            "user",
            "request",
            "entry",
            "stage_entry",
            "protocol",
            "workflow",
            "custom_entity",
            "aa_sequence",
            "dna_sequence",
            "batch",
            "box",
            "container",
            "location",
            "plate",
            "insights_dashboard",
            "folder",
            "sql_dashboard"
          ],
          "type": "string"
        },
        "webURL": {
          "description": "Canonical URL of the linked Benchling resource (if you have at least READ authorization for that resource), or the explicit URL provided as hyperlink for \"link\" types. Note: locations do not currently have a URL.\n",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": "object"
    },
    "EntryNotePart": {
      "description": "Notes are the main building blocks of entries. Each note corresponds roughly to a paragraph.\n",
      "oneOf": [
        {
          "$ref": "#/$defs/SimpleNotePart"
        },
        {
          "$ref": "#/$defs/TableNotePart"
        },
        {
          "$ref": "#/$defs/TextBoxNotePart"
        },
        {
          "$ref": "#/$defs/CheckboxNotePart"
        },
        {
          "$ref": "#/$defs/ExternalFileNotePart"
        },
        {
          "$ref": "#/$defs/AssayRunNotePart"
        },
        {
          "$ref": "#/$defs/LookupTableNotePart"
        },
        {
          "$ref": "#/$defs/ResultsTableNotePart"
        },
        {
          "$ref": "#/$defs/RegistrationTableNotePart"
        },
        {
          "$ref": "#/$defs/PlateCreationTableNotePart"
        },
        {
          "$ref": "#/$defs/BoxCreationTableNotePart"
        },
        {
          "$ref": "#/$defs/MixturePrepTableNotePart"
        },
        {
          "$ref": "#/$defs/InventoryContainerTableNotePart"
        },
        {
          "$ref": "#/$defs/InventoryPlateTableNotePart"
        },
        {
          "$ref": "#/$defs/ChartNotePart"
        },
        {
          "$ref": "#/$defs/AppCanvasNotePart"
        }
      ],
      "type": "object"
    },
    "EntrySchema": {
      "description": "Entry schema",
      "properties": {
        "id": {
          "description": "ID of the entry schema",
          "type": "string"
        },
        "modifiedAt": {
          "description": "DateTime the Entry Schema was last modified",
          "format": "date-time",
          "type": "string"
        },
        "name": {
          "description": "Name of the entry schema",
          "type": "string"
        }
      },
      "type": "object"
    },
    "EntryTable": {
      "description": "Actual tabular data with rows and columns of text on the note.\n",
      "properties": {
        "columnLabels": {
          "description": "Array of strings, with one item per column. Defaults to null, if the user is using the default, but is set if the user has given a custom name to the column.\n",
          "items": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": "array"
        },
        "name": {
          "description": "Name of the table - defaults to e.g. Table1 but can be renamed.\n",
          "type": "string"
        },
        "rows": {
          "description": "Array of row objects.",
          "items": {
            "$ref": "#/$defs/EntryTableRow"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "EntryTableCell": {
      "properties": {
        "link": {
          "allOf": [
            {
              "$ref": "#/$defs/EntryLink"
            }
          ],
          "description": "A Link Resource if this cell contained a hyperlink. Otherwise, link will be omitted from the cell object. (Note: inventory and user types are not yet supported.)\n"
        },
        "text": {
          "description": "The textual content of the cell. If the cell was originally a formula, this will be the evaluated version of the formula.\n",
          "type": "string"
        }
      },
      "type": "object"
    },
    "EntryTableRow": {
      "description": "Each has property 'cells' that is an array of cell objects",
      "properties": {
        "cells": {
          "items": {
            "$ref": "#/$defs/EntryTableCell"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "EntryTemplateDay": {
      "properties": {
        "day": {
          "description": "1 indexed day signifier. If 0 is returned, that means the EntryTemplateDay is a section with a title but no specified Day.",
          "minimum": 0,
          "type": "integer"
        },
        "notes": {
          "items": {
            "$ref": "#/$defs/EntryNotePart"
          },
          "type": "array"
        },
        "title": {
          "description": "Optional title of a section if sections are enabled.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": "object"
    },
    "ExternalFileNotePart": {
      "allOf": [
        {
          "$ref": "#/$defs/BaseNotePart"
        },
        {
          "properties": {
            "externalFileId": {
              "description": "The ID of the external file. Use the 'Get an external file' endpoint to retrieve metadata about it.\n",
              "type": "string"
            },
            "links": {
              "description": "Array of links referenced in the caption via an @-mention, hyperlink, or the drag-n-dropped preview attached to the note.\n",
              "items": {
                "$ref": "#/$defs/EntryLink"
              },
              "type": "array"
            },
            "text": {
              "description": "The caption of the file attachment.",
              "type": "string"
            },
            "type": {
              "enum": [
                "external_file"
              ],
              "type": "string"
            }
          },
          "type": "object"
        }
      ],
      "description": "An attached user-uploaded file"
    },
    "Field": {
      "properties": {
        "displayValue": {
          "readOnly": true,
          "type": [
            "string",
            "null"
          ]
        },
        "isMulti": {
          "readOnly": true,
          "type": "boolean"
        },
        "textValue": {
          "readOnly": true,
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "allOf": [
            {
              "$ref": "#/$defs/FieldType"
            }
          ],
          "readOnly": true
        },
        "value": {
          "description": "For single link fields, use the id of the item you want to link (eg. \"seq_jdf8BV24\").\nFor multi-link fields, use an array of ids of the items you want to link (eg. [\"seq_jdf8BV24\"])\n",
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "boolean"
            },
            {
              "type": "number"
            },
            {
              "type": "object"
            },
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          ]
        }
      },
      "required": [
        "value"
      ],
      "type": "object"
    },
    "FieldType": {
      "enum": [
        "dna_sequence_link",
        "aa_sequence_link",
        "custom_entity_link",
        "entity_link",
        "mixture_link",
        "molecule_link",
        "dropdown",
        "part_link",
        "translation_link",
        "aa_part_link",
        "base_molecule_link",
        "blob_link",
        "text",
        "long_text",
        "batch_link",
        "storage_link",
        "entry_link",
        "assay_request_link",
        "assay_result_link",
        "assay_run_link",
        "boolean",
        "float",
        "integer",
        "datetime",
        "date",
        "json"
      ],
      "type": "string"
    },
    "Fields": {
      "additionalProperties": {
        "$ref": "#/$defs/Field"
      },
      "type": "object"
    },
    "InventoryContainerTableNotePart": {
      "allOf": [
        {
          "$ref": "#/$defs/BaseNotePart"
        },
        {
          "$ref": "#/$defs/StructuredTableApiIdentifiers"
        },
        {
          "properties": {
            "destinationContainerSchemaId": {
              "type": "string"
            },
            "mode": {
              "enum": [
                "create_and_fill",
                "fill",
                "update"
              ],
              "type": "string"
            },
            "type": {
              "enum": [
                "inventory_container_table"
              ],
              "type": "string"
            }
          },
          "type": "object"
        }
      ]
    },
    "InventoryPlateTableNotePart": {
      "allOf": [
        {
          "$ref": "#/$defs/BaseNotePart"
        },
        {
          "$ref": "#/$defs/StructuredTableApiIdentifiers"
        },
        {
          "properties": {
            "destinationPlateSchemaId": {
              "type": [
                "string",
                "null"
              ]
            },
            "destinationWellSchemaId": {
              "type": "string"
            },
            "mode": {
              "enum": [
                "create_and_fill",
                "fill",
                "update"
              ],
              "type": "string"
            },
            "type": {
              "enum": [
                "inventory_plate_table"
              ],
              "type": "string"
            }
          },
          "type": "object"
        }
      ]
    },
    "LookupTableNotePart": {
      "allOf": [
        {
          "$ref": "#/$defs/StructuredTableApiIdentifiers"
        },
        {
          "properties": {
            "type": {
              "enum": [
                "lookup_table"
              ],
              "type": "string"
            }
          },
          "type": "object"
        }
      ]
    },
    "MixturePrepTableNotePart": {
      "allOf": [
        {
          "$ref": "#/$defs/BaseNotePart"
        },
        {
          "$ref": "#/$defs/StructuredTableApiIdentifiers"
        },
        {
          "properties": {
            "mixtureSchemaId": {
              "type": "string"
            },
            "type": {
              "enum": [
                "mixture_prep_table"
              ],
              "type": "string"
            }
          },
          "type": "object"
        }
      ]
    },
    "PartySummary": {
      "properties": {
        "handle": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "PlateCreationTableNotePart": {
      "allOf": [
        {
          "$ref": "#/$defs/BaseNotePart"
        },
        {
          "$ref": "#/$defs/StructuredTableApiIdentifiers"
        },
        {
          "properties": {
            "plateSchemaId": {
              "type": "string"
            },
            "type": {
              "enum": [
                "plate_creation_table"
              ],
              "type": "string"
            }
          },
          "type": "object"
        }
      ]
    },
    "RegistrationTableNotePart": {
      "allOf": [
        {
          "$ref": "#/$defs/BaseNotePart"
        },
        {
          "$ref": "#/$defs/StructuredTableApiIdentifiers"
        },
        {
          "properties": {
            "entitySchemaId": {
              "type": "string"
            },
            "type": {
              "enum": [
                "registration_table"
              ],
              "type": "string"
            }
          },
          "type": "object"
        }
      ]
    },
    "ResultsTableNotePart": {
      "allOf": [
        {
          "$ref": "#/$defs/BaseNotePart"
        },
        {
          "$ref": "#/$defs/StructuredTableApiIdentifiers"
        },
        {
          "properties": {
            "assayResultSchemaId": {
              "type": "string"
            },
            "type": {
              "enum": [
                "results_table"
              ],
              "type": "string"
            }
          },
          "type": "object"
        }
      ]
    },
    "SimpleNotePart": {
      "allOf": [
        {
          "$ref": "#/$defs/BaseNotePart"
        },
        {
          "properties": {
            "links": {
              "description": "Array of links referenced in text via an @-mention, hyperlink, or the drag-n-dropped preview attached to the note.\n",
              "items": {
                "$ref": "#/$defs/EntryLink"
              },
              "type": "array"
            },
            "text": {
              "description": "The textual contents of the note.",
              "type": "string"
            },
            "type": {
              "enum": [
                "text",
                "code",
                "list_bullet",
                "list_number"
              ],
              "type": "string"
            }
          },
          "type": "object"
        }
      ],
      "description": "Simple note parts include the following types: - 'text': plain text - 'code': preformatted code block - 'list_bullet': one \"line\" of a bulleted list - 'list_number': one \"line\" of a numbered list\n"
    },
    "StructuredTableApiIdentifiers": {
      "properties": {
        "apiId": {
          "type": "string"
        },
        "columns": {
          "items": {
            "$ref": "#/$defs/StructuredTableColumnInfo"
          },
          "type": "array"
        },
        "name": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "StructuredTableColumnInfo": {
      "properties": {
        "columnId": {
          "type": "string"
        },
        "isReadOnly": {
          "type": "boolean"
        },
        "name": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "TableNotePart": {
      "allOf": [
        {
          "$ref": "#/$defs/BaseNotePart"
        },
        {
          "properties": {
            "links": {
              "description": "Array of links referenced in the caption via an @-mention, hyperlink, or the drag-n-dropped preview attached to the note.\n",
              "items": {
                "$ref": "#/$defs/EntryLink"
              },
              "type": "array"
            },
            "table": {
              "allOf": [
                {
                  "$ref": "#/$defs/EntryTable"
                }
              ],
              "type": "object"
            },
            "text": {
              "description": "The caption of the table.",
              "type": "string"
            },
            "type": {
              "enum": [
                "table"
              ],
              "type": "string"
            }
          },
          "type": "object"
        }
      ],
      "description": "A table with rows and columns of text"
    },
    "TextBoxNotePart": {
      "allOf": [
        {
          "$ref": "#/$defs/BaseNotePart"
        },
        {
          "properties": {
            "links": {
              "description": "Array of links referenced via an @-mention, hyperlink, or the drag-n-dropped preview attached to the note.\n",
              "items": {
                "$ref": "#/$defs/EntryLink"
              },
              "type": "array"
            },
            "name": {
              "type": "string"
            },
            "text": {
              "type": "string"
            },
            "type": {
              "enum": [
                "text_box"
              ],
              "type": "string"
            }
          },
          "type": "object"
        }
      ]
    },
    "UserSummary": {
      "allOf": [
        {
          "$ref": "#/$defs/PartySummary"
        },
        {}
      ]
    }
  }
}