2020-05-26 23:08:26 -04:00
---
2020-07-30 08:09:33 -04:00
stage: Create
group: Source Code
2021-12-28 16:16:11 -05:00
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
2020-05-26 23:08:26 -04:00
---
2021-02-09 13:09:59 -05:00
# Markdown API **(FREE)**
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
2021-07-12 11:09:19 -04:00
POST /markdown
2018-05-18 06:25:59 -04:00
```
| Attribute | Type | Required | Description |
| --------- | ------- | ------------- | ------------------------------------------ |
2019-11-27 22:06:32 -05:00
| `text` | string | yes | The Markdown text to render |
2020-09-03 17:08:18 -04:00
| `gfm` | boolean | no | Render text using GitLab Flavored Markdown. Default is `false` |
2021-06-28 11:08:03 -04:00
| `project` | string | no | Use `project` as a context when creating references using GitLab Flavored Markdown. [Authentication ](index.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
2020-05-27 20:08:37 -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"
2018-05-18 06:25:59 -04:00
```
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 > " }
```