# htmlpub > Publish HTML pages, blogs, and ecommerce sites instantly. Drop an HTML file or paste code, get a shareable URL in seconds. No build tools, no deployment pipelines. ## Quick Links - [Homepage](https://htmlpub.com) - [API Documentation](https://htmlpub.com/docs/api) - [MCP Documentation](https://htmlpub.com/docs/mcp) - [OpenAPI Spec](https://htmlpub.com/openapi.json) - [Full LLM Reference](https://htmlpub.com/llms-full.txt) ## Key Facts - **Base URL**: `https://htmlpub.com` - **Auth**: `Authorization: Bearer hp_live_...` (API key, Pro plan) - **Free tier**: Paste HTML at htmlpub.com, no account needed, 5 pages, 7-day expiry - **Starter** ($10/mo): 50 pages, 1 blog, custom slugs, 1 custom domain, no expiry, 20K AI credits/mo - **Pro** ($25/mo): 250 pages, 3 blogs, API access, 5 custom domains, analytics + heatmaps, 3 team seats, 60K AI credits/mo - **Max HTML size**: 5MB - **Max asset size**: 2MB (Free), 5MB (Starter), 10MB (Pro) ## Platform Features - **Pages**: Publish single HTML files with auto-generated or custom slugs - **Sites**: Group pages into multi-page websites with shared navigation - **Blogs**: Full blogging platform with markdown posts, templates, landing pages, and RSS - **Analytics**: Page views, scroll depth, click heatmaps, conversion goals, device/browser breakdown - **Forms**: Auto-detect HTML forms and collect submissions - **E-commerce**: Accept payments via Stripe Connect, PayPal, Shopify, Lemon Squeezy - **Custom Domains**: Connect your own domain to any page, site, or blog - **Integrations**: Connect to Slack, Google Sheets, Notion, and 20+ services via Paragon - **Organizations**: Team workspaces with roles (Owner, Admin, Member) and invitations - **Tags**: Color-coded tags for organizing pages, sites, and forms - **AI Credits**: AI-powered page generation and blog post writing - **Asset Library**: Reusable assets (images, fonts, CSS) across pages and blogs ## Core API Endpoints ### Pages - `PUT /api/pages/{slug}` — Create/update a page (API key only) - `PATCH /api/pages/{slug}` — Update content, title, or site assignment - `GET /api/pages` — List your pages - `DELETE /api/pages/{slug}` — Delete a page - `GET /api/pages/{slug}/raw` — Get raw HTML (no auth) ### Assets - `POST /api/pages/{slug}/assets` — Upload asset (multipart, field: `file`) - `GET /api/pages/{slug}/assets` — List assets - `DELETE /api/pages/{slug}/assets/{assetId}` — Delete asset ### Sites - `POST /api/sites` — Create site `{ slug, name }` - `GET /api/sites` — List sites with pages - `PATCH /api/sites/{siteId}` — Update site - `DELETE /api/sites/{siteId}` — Delete site ### Blogs - `POST /api/blogs` — Create blog `{ slug, title }` - `GET /api/blogs` — List blogs with post counts - `PATCH /api/blogs/{blogId}` — Update blog settings - `DELETE /api/blogs/{blogId}` — Delete blog (cascading) - `POST /api/blogs/{blogId}/posts` — Create post `{ title, markdown, status }` - `GET /api/blogs/{blogId}/posts` — List posts (filter by status) - `PATCH /api/blogs/{blogId}/posts/{postId}` — Update post - `DELETE /api/blogs/{blogId}/posts/{postId}` — Delete post - `POST /api/blogs/{blogId}/posts/generate` — AI-generate a post (SSE stream) - `POST /api/blogs/{blogId}/templates` — Create HTML post template - `POST /api/blogs/{blogId}/assets` — Upload blog image ### Forms - `GET /api/forms` — List pages with form submissions - `GET /api/forms/{pageSlug}` — Get submissions for a page - `POST /api/forms/submit` — Submit form data (public, CORS enabled) ### Analytics - `GET /api/analytics/overview` — Dashboard overview with trends - `GET /api/analytics/pages` — Per-page metrics - `GET /api/analytics/pages/{pageId}` — Detailed page analytics - `GET /api/analytics/pages/{pageId}/heatmap` — Click heatmap data (Pro only) - `POST /api/analytics/collect` — Track events (public, CORS enabled) ### Organizations - `POST /api/orgs` — Create organization - `GET /api/orgs` — List organizations - `POST /api/orgs/{orgId}/invites` — Invite team member - `POST /api/orgs/invites/accept` — Accept invitation ### Tags - `POST /api/tags` — Create tag `{ name, color }` - `GET /api/tags` — List tags - `POST /api/tags/assignments` — Assign tag to entity - `POST /api/tags/assignments/bulk` — Bulk assign/remove tags ### Custom Domains - `POST /api/custom-domains` — Add domain `{ domain, pageId }` (Pro only) - `POST /api/custom-domains/{domain}/verify` — Verify DNS ### Credits - `GET /api/credits/balance` — Check AI credit balance - `GET /api/credits/history` — Credit transaction history ## MCP Tools (for AI assistants) htmlpub has a remote MCP server at `https://mcp.htmlpub.com/mcp` with 37 tools. OAuth-based auth, no API keys needed. ### Page Tools - `get_page(slug, compact?, section?)` — Read page HTML with compact mode or section extraction - `edit_page(slug, edits)` — Find-and-replace edits with optional `occurrence` targeting - `create_page(html, slug?, title?, siteId?, password?, organizationId?)` — Publish new page (custom slug requires Starter/Pro) - `update_page(slug, html, title?, password?)` — Full HTML replacement - `delete_page(slug)` — Delete a page - `list_pages()` — List all pages ### Site Tools - `create_site(name, slug, organizationId?)` — Create site collection - `list_sites()` — List sites with page counts ### Blog Tools - `create_blog(title, slug, description?, authorName?, organizationId?)` — Create blog - `get_blog(blogId)` — Get blog details - `update_blog(blogId, title?, description?, authorName?, slug?)` — Update blog - `delete_blog(blogId)` — Delete blog and all posts - `list_blogs()` — List blogs - `create_blog_post(blogId, title, markdown, slug?, excerpt?, tags?, status?)` — Create post - `get_blog_post(blogId, postId)` — Get post with full markdown - `edit_blog_post(blogId, postId, ...)` — Update post fields - `delete_blog_post(blogId, postId)` — Delete post - `list_blog_posts(blogId, status?, limit?, offset?)` — List posts ### Blog Template Tools - `create_blog_template(blogId, name, html, isDefault?)` — Create HTML template - `update_blog_template(blogId, templateId, html?, name?, isDefault?)` — Update template - `delete_blog_template(blogId, templateId)` — Delete template - `list_blog_templates(blogId)` — List templates ### Blog Landing & Asset Tools - `get_blog_landing(blogId)` — Get blog landing page HTML - `update_blog_landing(blogId, html)` — Set blog landing page - `remove_blog_landing(blogId)` — Remove landing page - `import_blog_asset(blogId, url, filename?)` — Import image for blog posts ### Asset Tools - `import_asset_from_url(slug, url, filename?)` — Import from URL (preferred) - `create_asset_upload(slug, filename, contentType)` — Get presigned upload URL - `complete_asset_upload(slug, filename, contentType, storagePath)` — Register uploaded asset - `upload_asset(slug, filename, base64Content, contentType)` — Upload via base64 (deprecated) - `list_assets(slug)` — List page assets ### Library Asset Tools - `list_library_assets(category?)` — List reusable assets (BRAND or GENERAL) - `upload_library_asset(url, category, label?, filename?)` — Import to library - `delete_library_asset(assetId)` — Delete library asset ### Other Tools - `analyze_url(url)` — Extract content, structure, colors, typography from a website - `list_organizations()` — List accessible organizations **Recommended edit workflow**: `get_page(section='meta')` → identify target → `get_page(section='style:0')` → `edit_page` with precise text ## Guides - [Build a Website with ChatGPT](https://htmlpub.com/blog/build-website-with-chatgpt) - [AI Prompt Cookbook (10 templates)](https://htmlpub.com/blog/ai-prompt-cookbook) - [Portfolio in 5 Minutes](https://htmlpub.com/blog/ai-portfolio-in-5-minutes) - [AI Landing Pages](https://htmlpub.com/blog/ai-landing-pages) - [Automate with API](https://htmlpub.com/blog/automate-with-api) ## Generating HTML for htmlpub When creating HTML for htmlpub, always: - Use a single self-contained HTML file (all CSS in `