2018-05-18 06:25:59 -04:00
# Markdown API
2020-04-03 08:09:52 -04:00
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/18926) in GitLab 11.0.
2018-05-18 06:25:59 -04:00
Available only in APIv4.
## Render an arbitrary Markdown document
2020-02-27 04:09:01 -05:00
```plaintext
2018-05-18 06:25:59 -04:00
POST /api/v4/markdown
```
| Attribute | Type | Required | Description |
| --------- | ------- | ------------- | ------------------------------------------ |
2019-11-27 22:06:32 -05:00
| `text` | string | yes | The Markdown text to render |
2018-05-18 06:25:59 -04:00
| `gfm` | boolean | no (optional) | Render text using GitLab Flavored Markdown. Default is `false` |
2020-03-12 02:09:35 -04:00
| `project` | string | no (optional) | Use `project` as a context when creating references using GitLab Flavored Markdown. [Authentication ](README.md#authentication ) is required if a project is not public. |
2018-05-18 06:25:59 -04:00
2020-01-30 10:09:15 -05:00
```shell
2018-05-18 06:25:59 -04:00
curl --header Content-Type:application/json --data '{"text":"Hello world! :tada:", "gfm":true, "project":"group_example/project_example"}' https://gitlab.example.com/api/v4/markdown
```
Response example:
```json
{ "html": "< p dir = \"auto \"> Hello world! < gl-emoji title = \"party popper \" data-name = \"tada \" data-unicode-version = \"6.0 \"> 🎉</ gl-emoji ></ p > " }
```