Deploy hosted app
deploy_appStart from a recipe: read_documentation hosted_apps, then the hosted_apps_recipe_* topic closest to the request (gallery, upload against a brief, review; for guests without an account: client approval, garage sale, workshop RSVP), and change that app rather than writing one from scratch. Keep content that changes — briefs, captions, prices, names — on the folder (its description, asset titles and fields), not in the files, so the team edits it in Playbook without a redeploy. Put a small web app that you wrote live at its own address, or replace the files of the app this workspace already has under the same slug. A hosted app is static files — HTML, CSS, JavaScript, no build step — that show ONE folder and its subfolders: a gallery, a portfolio, a catalogue. Returns the app's url, and warnings when Playbook spots a likely mistake in the files: fix each one and deploy again. The hosted_apps topic has the contract. In short, the page reads the folder through its own address: a GET of the RELATIVE URL playbook/api/<path> returns the Playbook REST API's answer to /v1/{organization}/<path> (e.g. playbook/api/assets?nested_assets=true), and playbook/app answers { board } (the folder; the app API keeps that name). The page needs and gets no token; every URL in the app must be relative. access sets who may open it: members (the default for a new app: people who can view the folder in Playbook, after signing in), public (anyone with the address), or password (visitors who give password). Make an app public only when the user asks for it; a deploy without access keeps an existing app's access. Whoever gets in sees everything on the folder, unapproved assets and uploader names included, and folders added under it later too, so confirm the folder with the user before deploying. The folder's own share settings do not protect the app, but its share link's watermark is on every image the app reads, and while that link allows downloads visitors can download originals through playbook/download, with the link's password if it has one; a subfolder whose own share link has a password gives its files that password and that link's terms (see the topic). Everything in files is served to every visitor: never put a token, a key, or content read from another folder into them. Visitors may upload into the folder (playbook/upload, see the topic): allowed while the folder's share link has Allow uploads or the upload-only page on, with no password, no email form and no past expiry, or, in an app that is not public, for a signed-in visitor who may upload to the folder. In a members app the page may also change the folder's assets as the signed-in visitor, with their permissions: title, description, status, fields, tags, approval and comments (see the topic), and read an asset's comments as that visitor sees them; public and password apps cannot read comments. A public or password app may also take guests through a playbook.json file (see the topic): visitors who sign up by name or enter a PIN from create_app_guest, and then run only the actions it declares on one item at a time — write set values into Status, select and typed fields under a condition, or leave an answer such as an RSVP or a vote. A guest's email and phone may only go into members-only fields (create_custom_field members_only), and guest text must be shown with textContent. Nothing else is written: no deletes, moves or folder changes. A redeploy without access keeps the app's access. Limits: an index.html is required; text files only (.html .css .js .mjs .json .svg .txt .webmanifest); at most 50 files and 1 MB in total — images stay in Playbook and are never part of the app. The workspace's plan caps how many apps it may have: a new app over the cap is refused with the reason, while replacing the files of an existing app never is. A deploy replaces the whole file set, so send every file each time, not only the changed ones; to change a few files of an existing app, edit_app_source is lighter. Every deploy, even of the same files, is kept as a new numbered version, and past 50 the oldest is dropped. The app reads the folder as whoever deployed it last. If the call times out, check list_app_versions before deploying again: a deploy that landed is already live, and a repeat adds another version. Requires write scope and permission to edit the folder.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"folder_token": "<folder_token>",
"slug": "<slug>",
"name": "<name>",
"files": "<files>"
},
"name": "deploy_app"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Display name of the app, at most 100 characters | |
| slug | Yes | The app's address: lowercase letters, digits and hyphens, at most 63 characters, starting with a letter or digit. Unique across all of Playbook, so make it specific; one taken by another workspace is refused with a 422. A slug this workspace already uses replaces that app's files. | |
| files | Yes | The complete file set: contents as text, keyed by path relative to the app's root, e.g. { "index.html": "<!doctype html>…", "app.js": "…", "styles.css": "…" }. Paths are plain names joined by `/` and `.`, with no leading slash. A top-level `worker.js` is the app's optional backend and is not served as a file; leave it out unless the `hosted_apps` topic says you need one. Nothing may sit under `playbook/`, which Playbook answers itself. | |
| access | No | Who may open the app. Omit to make a new app `members` and to keep an existing app's access. `public` only when the user asks for it. | |
| comment | No | A note stored with the new version, shown by list_app_versions | |
| password | No | For `password` access: at least 8 characters, and only on plans with share-link passwords. Omit to keep the app's current password. | |
| folder_token | Yes | Token of the folder the app shows, from list_folders. Its subfolders are readable too; nothing else in the workspace is. | |
| organization | No | Workspace slug, as returned by list_organizations. Omit it when the account has a single workspace — it is then resolved from your token. Pass it only when the account has several, or when you mean a workspace other than the obvious one. | |
| expected_version | No | When replacing an existing app: its `head_version_number` as you last read it. The deploy is refused with `stale_app` if the app changed since, instead of overwriting someone else's change. |