Skip to main content
Version: 202601

Theme Session

Edit a theme through an edit session, the same way the theme editor in the admin does

An edit session, identified by oseid, is one opening of the theme editor. Changes made in a session are isolated from other sessions and take effect only after they are saved to the theme's draft; saving checks whether the draft has changed since the session began.

Provides endpoints to create an edit session, check it for conflicts, and save it to the draft; read and write the session's files and apply batch edits; read and update the theme's global configuration (theme settings and global cards such as the header and footer); work with the cards on a page: list the cards added to a template, get a card's details, set card and block properties, add and remove blocks, and remove cards from a page; create cards in the session: list the session's card library, create and manage AI cards (block cards created from liquid code, where every write can be reverted), look up page-builder block definitions, and save a page-builder block into the session; and list, enable, and disable app embeds and script tags. To browse the cards available to add and work with page-builder templates, see Theme Card.