Skip to navigation

Working with Sections

Sections divide a document into logical groups. Because the API represents content as a flat list, the relationship between a section and the content it collapses is implicit. This guide explains what that means for reads and edits.

Beta APIs

The Document APIs are beta. Send the EARLY-ACCESS: true header on every request shown here; without it these endpoints are unavailable. See Introduction to Documents and the Stability Guidelines.

Sections divide a document into logical groups and appear in the document content list like every other piece of content. They have a few important properties.

  • All document types support sections except entry subtemplates.
  • All entries and entry templates must start with a section.
  • Sections must include either a date or a title.
  • Sections that include dates must be in chronological order. You can place sections without a date anywhere in the document.
  • Sections are never empty. If a partsMutation creates an empty section, the API inserts an empty text document part after it.

Section children

In Benchling, collapsing a section hides all document content that follows it. The API represents document content as a flat list, so understand the implicit relationship between a section and the content that follows it.

This also means that a partsMutation such as move or delete automatically changes which document content each section collapses.

The example below shows this. Here, the Results section would collapse all content before the Conclusion section.

A Benchling entry showing a collapsed Results section above an expanded Conclusion section
An entry with a collapsed section
GET /api/v3/entry/etr_2uBIDQGZ9W/parts/items