Convert Markdown, JSON, or text content to professionally formatted PDF, DOCX, or HTML documents. Supports template components with variable interpolation for creating consistent legal documents like contracts, briefs, and reports.
curl --request POST \
--url https://api.case.dev/format/v1/document \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"output_format": "pdf",
"input_format": "md",
"options": {
"components": [
{
"templateId": "<string>",
"content": "<string>",
"variables": {},
"styles": {}
}
]
}
}
'"<string>"API key starting with sk_case_
The source content to format
Desired output format
pdf, docx, html_preview Format of the input content
md, json, text Optional template composition and styling settings used during document generation
Show child attributes
Formatted document (binary for PDF/DOCX, HTML for preview)
The response is of type file.
Was this page helpful?
curl --request POST \
--url https://api.case.dev/format/v1/document \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"output_format": "pdf",
"input_format": "md",
"options": {
"components": [
{
"templateId": "<string>",
"content": "<string>",
"variables": {},
"styles": {}
}
]
}
}
'"<string>"