---
title: "Accepts one UTF-8 Markdown file and returns its converted Doc content HTML."
method: POST
path: "/documents/{documentId}/content/convertmarkdown"
tags: ["documents"]
---

# Accepts one UTF-8 Markdown file and returns its converted Doc content HTML.

`POST /documents/{documentId}/content/convertmarkdown`

## Request

- Base URL: `https://api.awork.com/api/v1`
- URL: `https://api.awork.com/api/v1/documents/{documentId}/content/convertmarkdown`
- Auth: HTTP bearer

The response contains converted content only. The caller decides whether to append it to or replace the
            target Doc, then saves the result through the normal document update flow. This endpoint does not save content
            or update live editing.
            <Check title="Required Permissions" icon="key">The user must have at least `write` permission for the specified document.</Check>

## Path parameters

- `documentId` string, uuid, required

## Request body `multipart/form-data`

- object
  - `content` string, binary, required: The required UTF-8 Markdown file.

## Response `200`

OK

- DocumentContentModel
  - `id` string, uuid: The id of the document.
  - `content` string, nullable: The content of a document's current version.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `404`: Not Found

## Changes

- **2026-10-16** `81151fac7e79`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/awork-io/apis/api-v1-reference/changes/documents/:documentId/content/convertmarkdown/post.md)

---

[API](https://skmtc.dev/awork-io/apis/api-v1-reference.md) · [All operations](https://skmtc.dev/awork-io/apis/api-v1-reference/llms.txt) · [OpenAPI document](https://skmtc.dev/awork-io/apis/api-v1-reference/revisions/81151fac7e79?raw)
