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

Authorizationstring (required) – Include header Authorization: Bearer YOUR_API_TOKEN
contentstring (required) – HTML or Markdown content
languagestring (optional) – html | markdown (default html)
titlestring (optional) – Display title for the generated share page
descriptionstring (optional) – Additional copy shown with the share
viewLimitnumber (optional) – Maximum view count before the share expires; null for unlimited
useRandomPasswordboolean (optional) – Generate a random 6-character password
passwordstring (optional) – Custom 6-character alphanumeric password
id (query)string (query, optional) – Retrieve a specific share by ID without authentication if public
mine (query)boolean (query, optional) – Set to true to list the authenticated user's shares
password (query)string (query, optional) – Supply the 6-character password when accessing protected shares

Code 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

markdownstring (required) – Markdown source

Code 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

Authorizationstring (required) – Include header Authorization: Bearer YOUR_API_TOKEN

Code 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.