Skip to main content
POST
/
api
/
v1
/
create-document
Create Document
import requests

url = "https://www.datalab.to/api/v1/create-document"

payload = {
    "markdown": "<string>",
    "output_format": "docx",
    "webhook_url": "<string>"
}
headers = {
    "X-API-Key": "<api-key>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "request_id": "<string>",
  "request_check_url": "<string>",
  "success": true,
  "error": "<string>",
  "versions": {}
}

Authorizations

X-API-Key
string
header
required

Cookies

wos-session
string
access_token
string
datalab_active_team
string

Body

application/json

Request model for creating documents from markdown.

markdown
string
required

The markdown content to convert to a document. Supports track changes markup (, , tags).

output_format
string
default:docx

The output format for the document. Currently only 'docx' is supported.

webhook_url
string | null

Optional webhook URL to call when the request is complete.

Response

Successful Response

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.

success
boolean
default:true

Whether the request was successful.

error
string | null

If the request was not successful, this will contain an error message.

versions

A dictionary of the versions of the libraries used in the request.