TanqoryDocs

Theme app extensions

How an app adds something to a store's website, app blocks for UI inside the page and app embeds for floating or sitewide scripts, how you declare them, and the rules review checks.

An app can put its own UI on a store's website without the merchant editing theme code. The merchant stays in charge: they place your blocks in the theme editor and switch your embeds on or off, per theme. There are two kinds, and the choice between them is the first thing review checks.

App blockApp embed
What it isA block the merchant adds inside a section of a page, like any block of the themeA script tag added to every page of a theme
Use it forUI that sits in the page: a booking form under a product, reviews, a size chart, a countdownUI that floats over the page or works on every page: a chat button, a cookie banner, an analytics or pixel script
Who places itThe merchant, in the theme editor, in a section that accepts app blocksNobody: the merchant switches it on, and it runs on every page
Where the files liveOn Tanqory, uploaded with the app version and served from the store's own addressOn your server, an https address
Merchant settingsUp to 25 (text, colours, a product and more)None
Shown in the theme editor's previewYesNo, only on the live store
ReviewedIts files, by hash, are part of the security checkIts script, pinned by its integrity hash, is part of the security check
GuideApp blocksApp embeds

Declare them

Both kinds belong to an app version, like its scopes and redirect URLs. Each change releases the next version: at once while the app is not published, and after review once it is (a second change waits until the first is approved or withdrawn).

You have three ways to declare them:

  • The partner dashboard. Open the app, then Extensions. Add app embed takes a name, a handle, the script URL, where it goes, how it loads and the script's integrity hash. Add app block takes a name, a handle, a description, an icon, where merchants can add it, the pages it is for, the script file and a stylesheet, and the settings merchants fill in, and uploads the files. Edit on a row changes a block or an embed you have.
  • The tanqory-partner command line (@tanqory/partner-cli 0.1.0-alpha.4 or later). Keep the declaration in tanqory.extensions.json next to your code, check it with tanqory-partner app extensions check, and send it with tanqory-partner app extensions push. It uploads each block file, then replaces the app's embeds and blocks with the file's lists. It runs as an MCP server too (tanqory-partner mcp), so a coding AI can do the same with your approval.
  • The Partner GraphQL API, which the other two call: partnerAppBlockAssetUploadCreate for each block file, then partnerAppUpdate with themeAppEmbeds and themeAppBlocks. Each list you send replaces that list; [] removes every entry, and leaving it out keeps it.
JSON
{
  "app": "<your app id, from tanqory-partner app list>",
  "themeAppEmbeds": [
    { "handle": "chat", "name": "Chat button", "src": "https://chat.example.com/widget.3.js", "placement": "body-end", "loading": "defer", "integrity": "sha384-oqVuAfXRKap7fdgcCY5uykM6+R9GqQ8K/uxy9rx7HNQlGYl1kPzQho1wx4JwY8wC" }
  ],
  "themeAppBlocks": [
    {
      "handle": "booking",
      "name": "Booking form",
      "description": "Dates and free rooms, under a room's details.",
      "script": "blocks/booking.js",
      "style": "blocks/booking.css",
      "settings": [{ "key": "heading", "type": "text", "label": "Heading", "default": "Check availability" }],
      "targets": ["section"],
      "requires": ["product"]
    }
  ]
}
Shell
npm install -g @tanqory/partner-cli@next
tanqory-partner login
tanqory-partner app extensions check
tanqory-partner app extensions push
tanqory-partner app extensions show --app <app id>

The handle is how merchants' themes keep your block or your embed's on and off across versions, so keep it once merchants use it. Removing an entry removes it from every theme with the next version.

Rules review checks

The security check of Listing and review reads your extensions. Each rule below fails it.

  1. UI inside the page is an app block. A form, a widget or a message that belongs next to the theme's own content is a block the merchant places. Do not build it as an app embed that finds a spot in the page.
  2. App embeds only for floating or sitewide UI. A chat button, a banner fixed to the edge of the screen, a cookie notice, a tracking or pixel script. If it has a place in the page, it is a block.
  3. No anchoring on theme markup. Your script must not look up the theme's elements (document.querySelector('.product-form'), the Add to cart button, a heading) to put your UI next to them or inside them. Themes differ, merchants change them, and the merchant decides where your UI goes. A block renders into the element it is given; an embed adds its own element to document.body.
  4. Never write into theme forms. Do not add fields to, change, or submit the theme's forms (product form, cart, contact, newsletter, search). What your app collects, it collects in its own UI and sends to your server through the app proxy.
  5. No iframes for storefront UI. App blocks are not iframes; render in the page. An iframe of your own server is refused by the store's security policy anyway.
  6. Keep the files you declared. A block runs only its reviewed script and stylesheet, and an embed's script is pinned by its integrity hash (saving an embed without one is refused). Do not load more code from elsewhere; a new script is a new version and a new review.
  7. Ask the store only through Tanqory. Call your server through the app proxy on the store's own address; the store's security policy refuses other addresses.

What merchants see

  • App blocks: in the theme editor, Add block in a section that accepts app blocks shows an Apps tab with your blocks. When your app is uninstalled, your blocks leave every theme of the store (the merchant can restore that change from the theme's history).
  • App embeds: in the theme editor, More actions, App embeds (or the Theme view, App embeds) lists your embeds with a switch each, off until the merchant turns it on. Uninstalling removes the switches; a reinstall starts with every embed off.
  • App blocks: files, settings, tqAppBlocks.register, limits
  • App embeds: placement, loading, integrity, limits
  • App proxy: your server on the store's own address

Built from commit c0b3fb3fdef7 · API version 2026-10