---
title: "Create Document"
method: POST
path: "/api/v1/create-document"
---

# Create Document

`POST /api/v1/create-document`

Create a DOCX document from markdown with track changes support. Supports <ins>, <del>, and <comment> tags.

## Cookies

- `wos-session` string
- `datalab_active_team` string

## Request body

- CreateDocumentRequest — Request model for creating documents from markdown.
  - `markdown` string, required — The markdown content to convert to a document. Supports track changes markup (<ins>, <del>, <comment> tags).
  - `output_format` string — The output format for the document. Currently only 'docx' is supported.
  - `webhook_url` string, nullable — Optional webhook URL to call when the request is complete.
  - `processing_location` string, nullable — Optional residency region override (e.g. us, eu). When provided, use file_url or direct-upload; multipart uploads are rejected. When omitted, the request uses the team's configured residency and profile.
  - `model_override_settings` object, nullable

## Response `200`

Successful Response

- InitialResponse
  - `success` boolean — Whether the request was successful.
  - `error` string, nullable — If the request was not successful, this will contain an error message.
  - `request_id` string, required — The ID of the request. This ID can be used to check the status of the request.
  - `request_check_url` string, required — The URL to check the status of the request and get results.
  - `versions` union — A dictionary of the versions of the libraries used in the request.
    - object
    - string

## Other responses

- `422` — Validation Error

---

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