/api/v1/transform/calloutBuild a callout / admonition API
GitHub, Docusaurus, MkDocs, Obsidian flavours.
POST /api/v1/transform/callout builds a markdown callout / admonition block in the exact syntax of GitHub, Docusaurus, MkDocs Material, or Obsidian.
Overview
Generate a callout block in the exact syntax your target tool expects. Avoids the headache of remembering whether MkDocs uses `!!!`, Docusaurus uses `:::`, or GitHub uses `> [!NOTE]`.
Request
Authenticate with Authorization: Bearer YOUR_API_KEY and send a JSON body containing the parameters below. Pick your language:
curl -X POST 'https://trymarkdownviewer.com/api/v1/transform/callout' \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"style":"github","kind":"note","title":"Heads up","body":"Read this."}'Body parameters
| Field | Type | Required | Description |
|---|---|---|---|
| style | "github" | "docusaurus" | "mkdocs" | "obsidian" | required | Target syntax. |
| kind | "note" | "tip" | "important" | "warning" | "caution" | required | Callout type. |
| title | string | optional | Optional callout title. |
| body | string | required | Body content. |
Response
Success responses are wrapped in a data field. Errors use { error: { code, message } } with an appropriate HTTP status — see the error reference.
{
"data": {
"markdown": "> [!NOTE]\n> **Heads up**\n>\n> Read this.\n"
}
}Related endpoints
Try in browser
Free tools that run the same logic locally — no API key, no upload.
Try it
Send a real request against your account in the API playground. Errors there link straight back to the error reference.