Build and edit my websites
connections_siteList, create and edit the member's websites ('my sites'); every save keeps a version. Nothing goes live until site_publish. Actions: list, create (name; a starter store makes a whole shop), save (files and deletes as a new version; baseVersionId must be the latest; keep saves small, one page, CSS inline, under 20 KB), add_image, history, read_file, diff, restore, import, preview_link, attach_domain, move_to_workspace, translate, footer, move_to_cloudflare (accountId; project optional: puts the live version on the member's own Cloudflare account and leaves the Connections copy live), deploy_functions (the site's server code, a Cloudflare Worker with env.DB and env.FILES), secret_request (a person types the value; never accept one in chat), connect_pay_webhook, connect_signin, put_files, list_files, delete_files, edit, rename, search, call_function, function_logs, delete_site, api_guide. Call api_guide for the full how-to of every action (what each sends and answers, the Worker's bindings, the form-submit address).A site whose production _worker.js serves GET /openapi.json becomes its owner's PRIVATE connector (my_app_tools, my_app_call); env.CNX_APP_ID is set. api_guide: API shape rules, a starter Worker and the cnx-auth.js helper; read it first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | diff: newer version id. rename: the new path. | |
| alt | No | add_image: alt text. | |
| dir | No | import: folder to use as the site, e.g. dist. | |
| ref | No | import: branch, tag or commit; default branch. | |
| url | No | import: public https link to a .zip or .tar.gz. | |
| body | No | call_function: request body as text (send JSON as a string). | |
| file | No | A file you hold in this chat, such as a picture you made; Connections fetches it. Use it in place of base64. | |
| from | No | diff: older version id. | |
| name | No | create: site name, at most 80 characters. | |
| path | No | read_file, rename: the file's path. call_function: path and query on the Worker, starting with /, default /. | |
| repo | No | import: public GitHub repo, owner/name. | |
| vars | No | deploy_functions: plain-text env values, NAME: text (UPPER_SNAKE_CASE). Never a secret. | |
| edits | No | edit: at most 50, in order. | |
| files | No | save: files to add or replace, at most 500. put_files: at most 50 files and 4 MB per call. | |
| limit | No | function_logs: events, default 50, max 100. search: matches, default 50, max 200. | |
| paths | No | delete_files: public file paths to remove, at most 50. | |
| query | No | search: text to find. | |
| regex | No | search: query is a regex. | |
| store | No | create, starter store: shop details. | |
| action | Yes | Which. | |
| delete | No | save: paths to remove. | |
| domain | No | attach_domain: the connected domain, e.g. susiegriswold.com. | |
| method | No | call_function: HTTP method; default GET. | |
| person | No | Linked person to run this call as (first name). Omit to run as the connection's holder. | |
| prompt | No | add_image: words for a NEW picture, instead of hosting one. | |
| rotate | No | connect_pay_webhook: new secret. connect_signin: refused (rotate_not_supported). | |
| scopes | No | connect_signin: default openid, profile; photo allowed; others refused. | |
| siteId | No | Site id, from action list. | |
| source | No | deploy_functions, not files: { storageFileId|url, dir }. | |
| channel | No | deploy_functions, secret_request, call_function, function_logs: which Worker; default preview. | |
| dry_run | No | Preview only. | |
| headers | No | call_function: request headers, NAME: text, at most 20. | |
| message | No | save, put_files, delete_files: a short note on the change. | |
| project | No | move_to_cloudflare: Cloudflare Pages project name (letters, digits, - and _); defaults to the website's address name. | |
| publish | No | put_files, delete_files, edit, rename: live (default true). restore: default false. | |
| quality | No | add_image with prompt; default low. | |
| starter | No | create: store makes the first version a whole shop. | |
| accountId | No | move_to_cloudflare: the member's 32-character Cloudflare account id. | |
| versionId | No | read_file, search, preview_link: version id, default latest; restore (required); list_files: default the live version. | |
| bodyBase64 | No | call_function: request body as base64, instead of body. | |
| errorsOnly | No | function_logs: only error events. | |
| footerLine | No | footer: show or hide the Powered by Connections line. | |
| ignoreCase | No | search: ignore case. | |
| secretName | No | secret_request: the env name the Worker reads, e.g. STRIPE_KEY. | |
| source_url | No | add_image: http(s) link to the picture. | |
| contentType | No | add_image: data_base64's type; optional. | |
| data_base64 | No | add_image: picture as base64, under 4 MB. | |
| redirectPath | No | connect_signin: where on the site the sign-in returns, e.g. /api/auth/connections/callback (default). | |
| sinceMinutes | No | function_logs: how far back in minutes, default 60, at most 1440. | |
| baseVersionId | No | save: base version; default latest. | |
| storageFileId | No | import: id of a zip in the member's Files. | |
| expiresInHours | No | preview_link: hours valid, default 168, at most 720. | |
| moveToNamespace | No | ||
| translateSiteKey | No | translate: Translate site key (tr_site_...) to serve other languages; empty string unlinks. | |
| compatibilityDate | No | deploy_functions: Workers compatibility date, YYYY-MM-DD. | |
| compatibilityFlags | No | deploy_functions: only nodejs_compat (node:crypto etc.). |