md2wechat Agent API markAgent API Docs
md2wechat Agent API markAgent API Docs
Homepage

Start

Markdown to WeChat API DocsQuickstartAuth

APIs

Integrations

Operations

ErrorsPricingContact
X (Twitter)

Convert

Convert Markdown into WeChat-ready HTML.

Convert

What it does

Turns Markdown into WeChat-ready HTML.

Required headers

Content-Type: application/json
Md2wechat-API-Key: wme_your_api_key

Request body

{
  "markdown": "# Hello\n\nBody",
  "theme": "default",
  "fontSize": "medium",
  "convertVersion": "v1"
}

Advanced layout uses the same endpoint

If your goal is not only "turn Markdown into HTML" but "make the article feel structured, easier to read, and easier to remember inside WeChat," you still use the same convert endpoint.

The difference is that the markdown field now contains advanced layout modules.

Smallest example:

{
  "markdown": ":::hero\ntitle: The first screen should decide whether this article is worth reading\nsubtitle: Advanced layout modules are not about decoration. They are about judgment, reading rhythm, and the next action.\ntags: layout | modules | wechat\n:::\n\n:::cards[What this article covers]\nDecision | Tell readers why this matters | Do not make them scroll before they know the point | accent\nReading | Keep narrow-screen reading light | Information layers matter more than visual noise | default\nAction | End with a clear next move | Save, follow, ask, or buy should not feel accidental | default\n:::\n\n## Body\n\nThen continue with normal Markdown.",
  "theme": "default",
  "fontSize": "medium",
  "convertVersion": "v1"
}

When advanced layout is worth using

It fits these content types especially well:

  • release notes that must explain what changed
  • tutorials that should stay readable on a phone
  • strategy pieces that must leave the reader with one judgment
  • service pages that need trust and action to land together

If you are only sending a short update, plain Markdown is often enough.

Theme parameter

  • theme must be one of the currently supported public theme ids.
  • Browse the full catalog at /themes.
  • See Theme for selection rules and API usage guidance.

Related pages

  • Advanced Layout
  • Advanced Layout Syntax
  • Advanced Layout Recipes

Copy-paste curl

curl -X POST "https://md2wechat.com/api/v1/convert" \
  -H "Content-Type: application/json" \
  -H "Md2wechat-API-Key: wme_your_api_key" \
  -d '{
    "markdown": "# Hello\n\nBody",
    "theme": "default",
    "fontSize": "medium",
    "convertVersion": "v1"
  }'

Success response

Returns WeChat-ready HTML.

Failure response

Auth failure or invalid markdown payload.

Agent notes

  • Best first endpoint for integration.
  • Safe for pipelines that only need HTML output.
  • If you want advanced layout, do not start by stacking many modules. Start with Advanced Layout Recipes.

Table of Contents

Convert
What it does
Required headers
Request body
Advanced layout uses the same endpoint
When advanced layout is worth using
Theme parameter
Related pages
Copy-paste curl
Success response
Failure response
Agent notes