Skip to content
Try Gitea Cloud ☁️ for 30 days → Accelerate your Development & Deploys!
This is the documentation of the next version, still under development. See the latest release.

Render a markup document as HTML

POST
/markup
curl --request POST \
--url https://gitea.com/api/v1/markup \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "Context": "example", "FilePath": "example", "Mode": "example", "Text": "example", "Wiki": true }'
Media typeapplication/json

MarkupOption markup options

object
Context

URL path for rendering issue, media and file links Expected format: /subpath/{user}/{repo}/src/{branch, commit, tag}/{identifier/path}/{file/dir}

string
FilePath

File path for detecting extension in file mode

string
Mode

Mode to render (markdown, comment, wiki, file)

string
Text

Text markup to render

string
Wiki

Is it a wiki page? (use mode=wiki instead)

boolean
Examplegenerated
{
"Context": "example",
"FilePath": "example",
"Mode": "example",
"Text": "example",
"Wiki": true
}

MarkupRender is a rendered markup document

Media typeapplication/json
string
Examplegenerated
example

APIValidationError is error format response related to input validation

message
string
url
string