### Deploy hook response JSON example Source: https://modulify.ai/docs/automations/deploy-hooks.md Example JSON response from a deploy hook call that started a build. Shows the structure with success, message, data, code, and version fields. The data.status is 'started' and data.deploymentId identifies the publish. ```json { "success": true, "message": "The latest saved version of the site is being published.", "data": { "status": "started", "deploymentId": "665f1d114d2b8e0012ab3501", "callId": "665f1d0f4d2b8e0012ab34ff" }, "code": 202, "version": "0.0.1577" } ``` -------------------------------- ### Call a deploy hook with curl Source: https://modulify.ai/docs/automations/deploy-hooks.md Send a GET request to the deploy hook URL to start a build. Keep the request a GET; a POST, PUT, or DELETE answers 405 and starts nothing. ```bash curl "YOUR_DEPLOY_HOOK_URL" ``` -------------------------------- ### Example prompt for a pottery studio landing page Source: https://modulify.ai/docs/getting-started/quick-start.md A sample prompt to describe a site for a small pottery studio in Lisbon, including sections, audience, and tone. Use this as a template for writing effective prompts. ```markdown A landing page for a small pottery studio in Lisbon. Sections for classes, a gallery, and a contact form. Warm, minimal, lots of white space. ``` -------------------------------- ### Example prompt for a pricing section Source: https://modulify.ai/docs/build/writing-prompts.md A concrete prompt example that specifies three tiers, a highlighted middle tier, and an annual toggle showing monthly equivalents. Use this style to give Modulify concrete constraints instead of adjectives. ```markdown A pricing section with three tiers. Middle tier highlighted as the recommended one. Annual toggle that shows the monthly equivalent underneath. ``` -------------------------------- ### publish_site Source: https://modulify.ai/docs/mcp/tools.md Publishes a site so the current build goes live. Waits for ongoing saves or restores, then starts the publish and returns immediately. Poll get_publish_status to know when it finishes. ```APIDOC ## publish_site ### Description Publishes a site so the current build goes live. It first waits for any save or code backup restore still running on the site, for up to two minutes, and if one is still running it fails with `Your latest changes are still being saved, so nothing was published. Please try again in a moment!` Otherwise it returns once the publish is started, not when it finishes, so poll `get_publish_status` until `running` is false. If a publish is already in flight the response carries `pending:true` and that run's `deploymentId` instead of starting a second one. ### Method POST ### Endpoint /publish_site ### Parameters #### Required - `projectId` (string) - Required - The ID of the project to publish. ### Scopes - `publish:write` ### Response #### Success Response - `pending` (boolean) - Indicates if a publish is already in flight. - `deploymentId` (string) - The ID of the deployment if pending is true. #### Error Response - `error` (string) - Error message if a save or restore is still running. ``` -------------------------------- ### LIST files with curl Source: https://modulify.ai/docs/data/storage-http-api.md Lists one level of the bucket. Results come back fifty at a time; pass nextToken as token to get the next page. An invalid token returns 400. ```bash curl -X POST https://your-cdn-link/list \ -H "X-Storage-Key: YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"prefix":"notes/"}' ``` -------------------------------- ### Prompt to create a database with a blog Source: https://modulify.ai/docs/data/databases.md Use this prompt to ask the AI to create a database and provision it before building. The AI will also read your codebase and recommend CMS collections. ```markdown Add a blog with posts, authors and tags. Posts need a title, cover image, body and publish date. ``` -------------------------------- ### Webhook Raw JSON payload for publish.succeeded Source: https://modulify.ai/docs/automations/webhooks.md Example payload for a 'publish.succeeded' event sent to a Raw JSON webhook. Note that 'success' is true only for this event, 'trigger' is 'manual' when a person started the publish, and 'publishedBy' is null when triggered by a deploy hook. The 'project.url' is the custom domain if set, otherwise the Modulify subdomain. ```json { "schemaVersion": "1.0", "event": "publish.succeeded", "success": true, "deliveryId": "0f2a6c1e-4f6b-4a2f-9b41-2b0f0a8c9d33", "timestamp": "2026-08-25T09:14:02.881Z", "environment": "production", "trigger": "manual", "test": false, "project": { "id": "665f1c9a4d2b8e0012ab34cd", "name": "Pottery Studio", "slug": "pottery-studio", "url": "https://pottery.example.com", "subdomain": "pottery-studio", "subdomainUrl": "https://pottery-studio.modulify.website", "customDomain": "pottery.example.com", "customDomainUrl": "https://pottery.example.com" }, "deployment": { "id": "665f1d114d2b8e0012ab3501", "buildId": "k3f9xq1a", "status": "ready", "startedAt": "2026-08-25T09:12:40.102Z", "finishedAt": "2026-08-25T09:14:02.640Z" }, "publishedBy": { "id": "6650aa3e4d2b8e0012ab1122", "name": "Ana" }, "dashboardUrl": "https://modulify.ai/dashboard/projects/pottery-studio", "error": null } ``` -------------------------------- ### Storage helper usage example Source: https://modulify.ai/docs/data/storage.md Shows the main storage operations: putting objects with visibility and content type, listing, reading, generating signed URLs, setting visibility, and deleting with error handling. Import only from server code; it throws in the browser by design. ```typescript import { putObject, listObjects, getObjectText, getSignedUrl, setVisibility, deleteObjects, StorageError } from '@/lib/modulify/storage' await putObject('submissions/123.json', JSON.stringify(data), { visibility: 'private' }) await putObject('uploads/photo.jpg', photoBytes, { contentType: 'image/jpeg', visibility: 'public' }) const { files } = await listObjects('submissions/') const raw = await getObjectText('submissions/123.json') const { url } = await getSignedUrl('invoices/2026-001.pdf', { download: true }) await setVisibility(['brochures/2026.pdf'], 'public') try { await deleteObjects(['uploads/old-1.jpg', 'uploads/old-2.jpg']) } catch (error) { if (error instanceof StorageError && error.data && 'failedKeys' in error.data) await deleteObjects(error.data.failedKeys) } ``` -------------------------------- ### remove_queued_message Source: https://modulify.ai/docs/mcp/tools.md Takes a message out of the queue permanently, along with any files attached to it. Refuses if the agent has already started the message. ```APIDOC ## remove_queued_message ### Description Takes a message out of the queue permanently, along with any files attached to it. The queue belongs to the whole workspace, so an entry may be one someone else is waiting on. A message the agent has already started is refused; `cancel_job` is the tool for that. ### Method DELETE ### Endpoint /remove_queued_message ### Parameters #### Required - **projectId** (string) - Required - The ID of the project/site. - **itemId** (string) - Required - The ID of the queued message. ### Request Example { "projectId": "string", "itemId": "string" } ### Response #### Success Response (200) - **success** (boolean) - Whether the removal was successful. #### Response Example { "success": true } ### Error Handling - **409 Conflict** - Message already started, cannot remove. ### Permissions - `sites:delete` ### Destructive This operation is destructive. ``` -------------------------------- ### delete_deploy_hook Source: https://modulify.ai/docs/mcp/tools.md Permanently deletes one hook and its whole call log. Its URL stops starting builds immediately. toggle_deploy_hook is the reversible option. ```APIDOC ## delete_deploy_hook ### Description Permanently deletes one hook and its whole call log. Its URL stops starting builds immediately. toggle_deploy_hook is the reversible option. ### Method MCP Tool ### Endpoint delete_deploy_hook ### Parameters #### Required - **projectId** (string) - Required - The project identifier. - **hookId** (string) - Required - The hook identifier. ### Response No specific response details provided. ``` -------------------------------- ### POST /create-folder Source: https://modulify.ai/docs/data/storage-http-api.md Create a folder with a given name, path, and visibility. ```APIDOC ## POST /create-folder ### Description Create a folder with a given name, path, and visibility. ### Method POST ### Endpoint /create-folder ### Parameters #### Request Body - **name** (string) - Required - The name of the folder. - **path** (string) - Required - The path where the folder should be created. - **visibility** (string) - Required - The visibility of the folder: "public" or "private". ### Request Example { "name": "notes", "path": "", "visibility": "public" } ### Response #### Success Response (200) - **name** (string) - The name of the created folder. - **visibility** (string) - The visibility of the created folder. #### Response Example { "name": "notes", "visibility": "public" } ``` -------------------------------- ### GET /templates Source: https://modulify.ai/docs/projects/templates.md Lists all published templates in the gallery, newest first. No authentication or parameters are required. The response uses the standard Modulify envelope. ```APIDOC ## GET /templates ### Description Lists all published templates in the gallery, newest first. The response uses the standard Modulify envelope. ### Method GET ### Endpoint https://api.modulify.ai/templates ### Parameters None. ### Request Example ```bash curl https://api.modulify.ai/templates ``` ### Response #### Success Response (200) - **success** (boolean) - Whether the request succeeded. - **message** (string) - Human-readable message. - **data** (array) - List of template objects. - **slug** (string) - Template identifier. - **image** (string|null) - Thumbnail URL on the CDN, or null if not available. - **name** (string) - Display name of the template. - **category** (string|null) - Category badge, or null if none. - **previewLink** (string) - Live site URL. - **code** (integer) - HTTP-like status code. - **version** (string) - API build version. #### Response Example ```json { "success": true, "message": "Public templates listed successfully.", "data": [ { "slug": "cutout-template", "image": "https://cdn.modulify.ai/previews/6a7f2ab5bb95d1de460e9568.webp", "name": "Maren Okonkwo", "category": "portfolio", "previewLink": "https://cutout-template.modulify.website" } ], "code": 200, "version": "0.0.1414" } ``` ### Notes - No authentication required. - Response is cached in memory; recent changes may take a moment to reflect. - Treat a call as failed unless HTTP status is ok and `success` is true. ``` -------------------------------- ### start_domain_verification Source: https://modulify.ai/docs/mcp/tools.md Begins the ownership check for a domain before it is attached. Requires a paid plan and the site must not already have a custom domain. Returns one TXT record to add; then `verify_domain` is the step that actually connects it. ```APIDOC ## start_domain_verification ### Description Begins the ownership check for a domain before it is attached. Requires a paid plan and the site must not already have a custom domain. Returns one TXT record to add; then `verify_domain` is the step that actually connects it. ### Required Permissions `config:write` ### Required Parameters - `projectId` (string) - Required - `domain` (string) - Required ``` -------------------------------- ### create_backup Source: https://modulify.ai/docs/mcp/tools.md Takes a snapshot of a project's pages and components. These backup tools operate on the older page-and-component document model, not on a site's source files, so for a site project this is **not** a safety net before a code change. Use [Backups](/docs/editor/backups) for that. It captures no stored files, no database rows and no environment variables. ```APIDOC ## create_backup ### Description Takes a snapshot of a project's pages and components. These backup tools operate on the older page-and-component document model, not on a site's source files, so for a site project this is **not** a safety net before a code change. Use [Backups](/docs/editor/backups) for that. It captures no stored files, no database rows and no environment variables. ### Required Permissions `sites:write` ### Required Parameters - `projectId` (string) - Required - The project identifier. ### Optional Parameters - `name` (string) - Optional - Backup name, 2 to 84 characters. ### Response Creates a backup snapshot of the project's pages and components. ``` -------------------------------- ### Request a schema change in chat Source: https://modulify.ai/docs/data/databases.md Example of a natural-language request to the AI for a schema change. The AI runs the SQL statement for you; there is no query editor. ```markdown Add a "featured" boolean to posts, defaulting to false, and set it true for the three newest posts. ```