Theme
The theme endpoints expose everything the Theme Editor controls as one JSON document: the template and base theme, brand colors, fonts, dark mode, the hero (text, background media, colors), buttons, homepage sections, the footer, brand images, the per-template settings, the editable front-end labels, the submitter panel and the raw DaisyUI CSS variables. A write goes through the same save path as the editor’s Save button and is live at once. This is what lets an AI assistant restyle a directory: the MCP server exposes these endpoints as theget_theme, update_theme and preview_theme tools, and the CLI as directify theme.
Get Theme
directory_id(integer, required): The ID of the directorylocale(string, optional): An extra language code. The hero title and subtitle, the homepage content and the labels come back as that language’s translations (see Languages).
translations is present on multilingual directories when no locale is given. The options block also carries the allowed hero_heights, logo_sizes, category_counts, map_placements, slideshow_intervals, footer_link_targets and the *_supported flags that say which groups this template renders.
Update Theme
Errors:
422 with a message per field. Messages list the valid choices (templates, themes, fonts, section keys, template settings, CSS variables), so a wrong value can be corrected from the error alone. ?locale is rejected on writes — use translations.
Preview (screenshot)
page(string, optional):home(default),browse,categories,category,listing,blog,maporsubmit.category,listingandblogneed at least one record.width(integer, optional): viewport width375,768,1280(default) or1440locale(string, optional): an extra language code to capture that language’s pages
422 explains why a capture wasn’t possible (the page doesn’t exist yet, or the screenshot provider is unavailable).
