Documentation
Everything you need to integrate with MistPage: Quick Start, MCP Server, REST API, and Webhooks.
Quick Start
Get started with the MistPage API in three steps.
Authentication
All requests require a Bearer token. Create one in Dashboard > Settings > API Keys.
Authorization: Bearer sk_mistpage_...
Base URL
https://mistpage.com/api/v1
Step 1: Get an API Key
Sign in to MistPage, go to Dashboard > Settings > API Keys, and click "Create Key".
Step 2: Create a Project
Create a new project using the API:
curl -X POST https://mistpage.com/api/v1/projects \
-H "Authorization: Bearer sk_mistpage_..." \
-H "Content-Type: application/json" \
-d '{"title": "My Project"}'{
"data": {
"id": "proj_...",
"title": "My Project",
"slug": "my-project",
"status": "draft"
}
}Step 3: Upload & Publish
Upload files and publish your project:
curl -X POST https://mistpage.com/api/v1/projects/{id}/upload \
-H "Authorization: Bearer sk_mistpage_..." \
-F "files=@index.html" \
-F "files=@style.css" \
-F "entryFile=index.html"curl -X POST https://mistpage.com/api/v1/projects/{id}/publish \
-H "Authorization: Bearer sk_mistpage_..."MCP Server
Connect MistPage to your AI tools via Model Context Protocol (MCP).
What is MCP?
Model Context Protocol (MCP) is a standard protocol that allows AI assistants (like Claude, Cursor) to call external tools directly. MistPage's MCP Server lets your AI assistant create projects, upload files, publish content, and view analytics.
https://mistpage.com/api/mcpClaude Desktop Config
{
"mcpServers": {
"mistpage": {
"url": "https://mistpage.com/api/mcp",
"headers": {
"Authorization": "Bearer sk_mistpage_..."
}
}
}
}Cursor Config
{
"mcpServers": {
"mistpage": {
"url": "https://mistpage.com/api/mcp",
"headers": {
"Authorization": "Bearer sk_mistpage_..."
}
}
}
}Available Tools
| Tool Name | Description |
|---|---|
| list_projects | List all projects |
| create_project | Create a new project |
| get_project | Get project details |
| update_project | Update project info |
| delete_project | Delete a project |
| upload_files | Upload files |
| publish_project | Publish a project |
| deploy_project | Create, upload, and publish in one step |
| get_analytics | Get visit analytics |
| get_account_info | Get account info and quotas |
REST API
Full RESTful API for managing projects, uploading files, and viewing analytics.
Authentication
All API requests require a Bearer token in the header. Create one in Settings > API Keys.
Authorization: Bearer sk_mistpage_...
/api/v1/projectsCreate a new project (hosted or link type).
Parameters
titleRequiredstringslugOptionalstringdescriptionOptionalstringRequest
curl -X POST https://mistpage.com/api/v1/projects \
-H "Authorization: Bearer sk_mistpage_..." \
-H "Content-Type: application/json" \
-d '{"title": "My Project"}'Response
{
"data": {
"id": "proj_...",
"title": "My Project",
"slug": "my-project",
"status": "draft",
"createdAt": "2026-04-03T12:00:00.000Z"
}
}/api/v1/projectsList all projects with basic stats.
Request
curl https://mistpage.com/api/v1/projects \ -H "Authorization: Bearer sk_mistpage_..."
Response
{
"data": [...],
"meta": { "total": 5 }
}/api/v1/projects/:idGet detailed project information.
Request
curl https://mistpage.com/api/v1/projects/{id} \
-H "Authorization: Bearer sk_mistpage_..."Response
{
"data": {
"id": "proj_...",
"title": "My Project",
"slug": "my-project",
"accessPassword": true,
"expiresAt": null,
"webhookUrl": "https://..."
}
}/api/v1/projects/:idUpdate project title, slug, or description.
Parameters
titleOptionalstringslugOptionalstringdescriptionOptionalstringRequest
curl -X PATCH https://mistpage.com/api/v1/projects/{id} \
-H "Authorization: Bearer sk_mistpage_..." \
-H "Content-Type: application/json" \
-d '{"title": "New Title"}'Response
{
"data": {
"id": "proj_...",
"title": "New Title",
"slug": "my-project"
}
}/api/v1/projects/:idPermanently delete a project and all its files.
Request
curl -X DELETE https://mistpage.com/api/v1/projects/{id} \
-H "Authorization: Bearer sk_mistpage_..."Response
{
"data": { "deleted": true }
}/api/v1/projects/:id/uploadUpload files to create a new version (max 4.5MB via API).
Parameters
filesRequiredmultipart filesentryFileOptionalstringlabelOptionalstringRequest
curl -X POST https://mistpage.com/api/v1/projects/{id}/upload \
-H "Authorization: Bearer sk_mistpage_..." \
-F "files=@index.html" \
-F "files=@style.css" \
-F "entryFile=index.html"Response
{
"data": {
"versionId": "ver_...",
"fileCount": 2,
"totalSize": 4096
}
}/api/v1/projects/:id/publishPublish the latest version (or a specific version).
Parameters
versionIdOptionalstringRequest
curl -X POST https://mistpage.com/api/v1/projects/{id}/publish \
-H "Authorization: Bearer sk_mistpage_..."Response
{
"data": {
"published": true,
"versionId": "ver_..."
}
}/api/v1/projects/:id/analyticsGet visit analytics for a project.
Request
curl https://mistpage.com/api/v1/projects/{id}/analytics \
-H "Authorization: Bearer sk_mistpage_..."Response
{
"data": {
"overview": { "totalVisits": 128, "uniqueVisitors": 45, "passwordVerified": 12 },
"daily": [...],
"devices": [...],
"countries": [...],
"referers": [...]
}
}Error Handling
All errors return a JSON object with code and message.
{
"error": {
"code": "VALIDATION",
"message": "title is required"
}
}400 — Validation error
401 — Missing or invalid API key
403 — Insufficient permissions
404 — Resource not found
413 — Upload too large (4.5MB API limit)
Webhooks
Receive real-time notifications when your projects are visited.
Overview
When someone visits your project, MistPage sends a POST request to your configured URL.
Setup
Go to Project Settings > Webhook, enter your HTTPS URL, and save.
Payload Format
Each time a project is visited, you'll receive a JSON payload like this:
{
"event": "project.visited",
"project": {
"id": "proj_...",
"slug": "my-project",
"title": "My Project"
},
"visitor": {
"country": "US",
"referer": "https://..."
},
"timestamp": "2026-04-03T12:00:00.000Z"
}More event types (project created, file uploaded, version published) are coming soon.