Deploy, manage, and monitor static websites via the EzyHost API. Upload files, build with AI, track analytics, manage custom domains, QR codes, email capture, and team collaboration.
This document describes how AI agents can interact with EzyHost programmatically.
For human users, visit ezyhost.io.
CODEBLOCK0
All API requests require an API key passed as a header:
CODEBLOCK1
The key is loaded from the EZYHOST_API_KEY environment variable. Generate your API key at https://ezyhost.io/dashboard/api-keys.
Note: API access requires the Pro plan or higher.
GET /api/projects
Returns INLINECODE2
POST /api/projects
Content-Type: application/json
Body: { "name": "my-site", "subdomain": "my-site" }
Returns INLINECODE3
The subdomain must be 3+ characters, lowercase alphanumeric with hyphens. Returns 409 SUBDOMAIN_TAKEN if already in use. Your site will be live at https://{subdomain}.ezyhost.site.
Optional fields: displayMode ("standard" | "presentation"), hideFromSearch (boolean), password (string).
GET /api/projects/check-subdomain/:subdomain
Returns { available: true/false, subdomain }. Use this to validate before creating.
GET /api/projects/:id
Returns INLINECODE10
DELETE /api/projects/:id
Deletes the project and all associated files from storage. This cannot be undone.
POST /api/upload/:projectId
Content-Type: multipart/form-data
Body: files (multipart)
Returns INLINECODE11
Supports .zip archives (auto-extracted) and individual files. All uploaded files go through malware scanning (ClamAV + magic byte validation).
Supported file types: HTML, CSS, JS, JSON, XML, SVG, images (PNG, JPG, GIF, WebP, AVIF, ICO), PDFs, presentations (PPTX), documents (DOCX, XLSX), audio (MP3, WAV, OGG, FLAC, AAC), video (MP4, WebM, MOV), fonts (WOFF, WOFF2, TTF, OTF, EOT), archives (ZIP), 3D models (GLB, GLTF, OBJ), and any other static asset.
Blocked file types: Executables (.exe, .dll, .bat, .sh, .php, .asp, .jar) and SVGs containing scripts or event handlers are rejected.
PATCH /api/upload/:projectId/files/:fileId
Content-Type: application/json
Body: { "newPath": "assets/renamed-file.png" }
POST /api/github/:projectId
Content-Type: application/json
Body: { "owner": "username", "repo": "repo-name", "branch": "main", "subfolder": "dist" }
Returns INLINECODE13
Imports files from a public GitHub repository. The branch defaults to "main" and automatically falls back to "master" if not found. The optional subfolder field lets you import only a subdirectory (e.g. "dist", "build").
Requires Pro plan or higher.
GET /api/versions/:projectId
Returns INLINECODE16
POST /api/versions/:projectId
Content-Type: application/json
Body: { "label": "v1.0" }
Snapshots the current state of all project files. Requires Pro plan or higher.
POST /api/versions/:projectId/rollback/:version
Restores all files to the state captured in the specified version number.
GET /api/seo/:projectId
Returns INLINECODE17
Requires Pro plan or higher.
POST /api/seo/:projectId/analyze
Triggers a fresh SEO scan and returns updated suggestions.
POST /api/seo/:projectId/ai-fix
Content-Type: application/json
Body: { "suggestionIds": ["id1", "id2"] }
Uses AI to automatically fix SEO issues in your HTML files. Counts against AI generation limits.
GET /api/analytics/:projectId?period=7d
Periods: 24h, 7d, 30d, INLINECODE21
Basic analytics (all plans):
Returns INLINECODE22
Advanced analytics (Pro+ plans):
Additionally returns INLINECODE23
Free plan users receive isAdvanced: false and advanced fields are empty.
POST /api/analytics/track
Content-Type: application/json
Body: { "projectId": "...", "path": "/page", "referrer": "..." }
POST /api/qrcode/:projectId
Returns INLINECODE25
Generates a QR code pointing to the project's live URL (subdomain or custom domain). Returns a base64 data URL. Available on all paid plans.
GET /api/qrcode/:projectId
Returns { qrCodeUrl: "data:image/..." | null }
PATCH /api/emails/:projectId/toggle
Returns { emailCapture: true/false }. Requires Business plan.
When enabled, visitors to the hosted site see a popup email collection form after 5 seconds.
POST /api/emails/submit
Content-Type: application/json
Body: { "email": "visitor@example.com", "projectId": "...", "source": "modal" }
Source options: modal, inline, api. Only works if the project has email capture enabled and the project owner has a Business plan.
GET /api/emails/:projectId?page=1&limit=50
Returns INLINECODE31
Requires Business plan.
GET /api/emails/:projectId/export
Returns a CSV file download. Requires Business plan.
DELETE /api/emails/:projectId/:emailId
GET /api/teams
Returns INLINECODE32
POST /api/teams
Content-Type: application/json
Body: { "name": "My Team" }
Requires Business plan.
POST /api/teams/:teamId/members
Content-Type: application/json
Body: { "email": "user@example.com", "role": "editor" }
Roles: editor, viewer.
DELETE /api/teams/:teamId
POST /api/domains/:projectId
Content-Type: application/json
Body: { "domain": "example.com" }
Returns { dnsInstructions: { type, name, value } } — DNS records you need to create.
Requires Pro plan or higher.
GET /api/domains/:projectId/verify
Returns { verified: true/false, dnsInstructions }. Call this after setting up DNS records.
DELETE /api/domains/:projectId
POST /api/aibuilder/chat
Content-Type: application/json
Body: { "message": "build a portfolio site", "history": [], "currentFiles": [] }
Returns SSE stream with events:
status — progress updates ("Generating HTML..."){ files: [{ filename, content }] } — the generated files{ message } on failureCounts against per-plan AI generation limits. Only one AI generation can run at a time per user.
POST /api/aibuilder/download-zip
Content-Type: application/json
Body: { "files": [{ "filename": "index.html", "content": "..." }] }
Returns a ZIP file download.
CODEBLOCK42
Template body: { "name": "My Template", "description": "...", "messages": [...], "files": [...] }
GET /api/apikey
Returns { hasKey: true/false, apiKey: "ag_••••..." } — key is partially masked.
POST /api/apikey/generate
Returns { apiKey: "ag_..." } — full key shown only once. Store it securely. Revokes any previous key.
Requires Pro plan or higher.
DELETE /api/apikey
GET /api/plans
No authentication required. Returns { plans: [{ plan, name, priceMonthly, maxProjects, maxStorageMB, ... }] } with all feature flags and limits for each plan.
GET /api/billing
Returns { plan, subscription, aiCredits, usage }.
GET /api/billing/ai-usage
Returns { used, limit, remaining, resetsAt }.
| Feature | Free | Pro ($9/mo) | Business ($29/mo) |
|---|---|---|---|
| Projects | 2 | 15 | Unlimited |
| Storage |
Sites are served at:
https://{your-domain.com} (Pro+ plans)All sites include HTTPS, CDN caching, automatic file browser for non-HTML projects, and optional presentation mode for PDF/PPTX files.
Injected features on served sites:
removeBranding project setting.All errors return JSON:
CODEBLOCK49
Plan limit errors include "upgrade": true to indicate a higher plan is needed:
CODEBLOCK50
Subdomain conflicts:
CODEBLOCK51
Common HTTP status codes:
400 — Bad request / validation errorCODEBLOCK52
Your site is now live at INLINECODE60
CODEBLOCK53
CODEBLOCK54
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 ezyhost-1776420028 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 ezyhost-1776420028 技能
skillhub install ezyhost-1776420028
文件大小: 5.81 KB | 发布时间: 2026-4-17 20:09