Developer Kit
API Documentation
Complete RESTful reference with multi-language samples and integration tips.
Rapid integration
Secure by design
Multi-language examples
API Basics
Base URL
https://html2web.h7ml.cn/api
Content-Type
application/json
Create Share
POST /api/share
Create a shareable HTML or Markdown snippet.
Request Parameters
content
string (required) – HTML or Markdown contentlanguage
string (optional) – html | markdown (default html)userId
string (optional) – user identifierCode Examples
curl -X POST https://html2web.h7ml.cn/api/share \
-H "Content-Type: application/json" \
-d '{
"content": "<h1>Hello World</h1><p>This is my content</p>",
"language": "html"
}'
Response Example
{
"id": "abc12345",
"language": "html",
"message": "Share link generated successfully"
}
Markdown Conversion
POST /api/markdown
Convert Markdown content into HTML output.
Request Parameters
markdown
string (required) – Markdown sourceCode Examples
curl -X POST https://html2web.h7ml.cn/api/markdown \
-H "Content-Type: application/json" \
-d '{
"markdown": "# Hello World\n\nThis is **bold** text."
}'
Response Example
{
"html": "<!DOCTYPE html>...",
"markdown": "# Hello World...",
"message": "Markdown converted successfully"
}
Daily Check-inAuthentication Required
POST /api/checkin
Award users 20–50 points for daily check-in (requires auth).
Code Examples
curl -X POST https://html2web.h7ml.cn/api/checkin \
-H "Cookie: next-auth.session-token=YOUR_SESSION_TOKEN"
Response Example
{
"success": true,
"points": 35,
"totalPoints": 285,
"streak": 7,
"message": "Check-in successful! Earned 35 points, 7-day streak"
}
Keep exploring
Download the OpenAPI spec or jump back to HTML2WEB to keep building.