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 ShareAuthentication Required
POST /api/share
Create a shareable HTML or Markdown snippet (requires API token or active session).
Request Parameters
Authorization
string (required) – Include header Authorization: Bearer YOUR_API_TOKENcontent
string (required) – HTML or Markdown contentlanguage
string (optional) – html | markdown (default html)title
string (optional) – Display title for the generated share pagedescription
string (optional) – Additional copy shown with the shareviewLimit
number (optional) – Maximum view count before the share expires; null for unlimiteduseRandomPassword
boolean (optional) – Generate a random 6-character passwordpassword
string (optional) – Custom 6-character alphanumeric passwordid (query)
string (query, optional) – Retrieve a specific share by ID without authentication if publicmine (query)
boolean (query, optional) – Set to true to list the authenticated user's sharespassword (query)
string (query, optional) – Supply the 6-character password when accessing protected sharesCode Examples
curl -X POST https://html2web.h7ml.cn/api/share \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-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 API token or active session).
Request Parameters
Authorization
string (required) – Include header Authorization: Bearer YOUR_API_TOKENCode Examples
curl -X POST https://html2web.h7ml.cn/api/checkin \
-H "Authorization: Bearer YOUR_API_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.