---
title: "Render a markdown document as HTML"
method: POST
path: "/markdown"
tags: ["miscellaneous"]
---

# Render a markdown document as HTML

`POST /markdown`

## Request body

- MarkdownOption — MarkdownOption markdown options
  - `Context` string — URL path for rendering issue, media and file links Expected format: /subpath/{user}/{repo}/src/{branch, commit, tag}/{identifier/path}/{file/dir}
  - `Mode` string — Mode to render (markdown, comment, wiki, file)
  - `Text` string — Text markdown to render
  - `Wiki` boolean — Is it a wiki page? (use mode=wiki instead)

## Response `200`

MarkdownRender is a rendered markdown document

- string

## Other responses

- `422` — APIValidationError is error format response related to input validation

---

[API](https://skmtc.net/gitea/apis/gitea-api.md) · [All operations](https://skmtc.net/gitea/apis/gitea-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gitea/gitea-api/versions/350de506cefa/schema)
