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.

Endpointhttps://mistpage.com/api/mcp
AuthenticationBearer token (same API Key as the REST API)
TransportStreamable HTTP

Claude 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 NameDescription
list_projectsList all projects
create_projectCreate a new project
get_projectGet project details
update_projectUpdate project info
delete_projectDelete a project
upload_filesUpload files
publish_projectPublish a project
deploy_projectCreate, upload, and publish in one step
get_analyticsGet visit analytics
get_account_infoGet 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_...
POST/api/v1/projects

Create a new project (hosted or link type).

Parameters

titleRequiredstring
slugOptionalstring
descriptionOptionalstring

Request

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"
  }
}
GET/api/v1/projects

List all projects with basic stats.

Request

curl https://mistpage.com/api/v1/projects \
  -H "Authorization: Bearer sk_mistpage_..."

Response

{
  "data": [...],
  "meta": { "total": 5 }
}
GET/api/v1/projects/:id

Get 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://..."
  }
}
PATCH/api/v1/projects/:id

Update project title, slug, or description.

Parameters

titleOptionalstring
slugOptionalstring
descriptionOptionalstring

Request

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"
  }
}
DELETE/api/v1/projects/:id

Permanently 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 }
}
POST/api/v1/projects/:id/upload

Upload files to create a new version (max 4.5MB via API).

Parameters

filesRequiredmultipart files
entryFileOptionalstring
labelOptionalstring

Request

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
  }
}
POST/api/v1/projects/:id/publish

Publish the latest version (or a specific version).

Parameters

versionIdOptionalstring

Request

curl -X POST https://mistpage.com/api/v1/projects/{id}/publish \
  -H "Authorization: Bearer sk_mistpage_..."

Response

{
  "data": {
    "published": true,
    "versionId": "ver_..."
  }
}
GET/api/v1/projects/:id/analytics

Get 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"
  }
}

400Validation error

401Missing or invalid API key

403Insufficient permissions

404Resource not found

413Upload 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.