POST
/v1/documentsCreate Document
Create a new document.
Create a new document saved to your account. The document is not published. Use POST /v1/documents/:id/publish to publish it, or use POST /v1/documents/publish to create and publish in one call.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
title | string | No | "Untitled" | Document title |
content | string | No | "" | Markdown content |
template_id | string | No | "swiss" | Template ID for styling. See Templates |
theme_mode | string | No | "light" | Color theme: "light" or "dark" |
Response
Returns the created document.
| Field | Type | Description |
|---|---|---|
id | string | Document UUID |
title | string | Document title |
template_id | string | Template applied to the document |
theme_mode | string | Color theme |
created_at | string | ISO 8601 timestamp |
Errors
| Status | Code | Description |
|---|---|---|
| 400 | validation_error | Invalid request body |
| 401 | unauthorized | Missing or invalid API key |
| 403 | forbidden | Free tier document limit (3) reached. Upgrade to Pro for unlimited documents. |
| 429 | rate_limited | Rate limit or monthly quota exceeded |
| 500 | internal_error | Unexpected server error |
NOTE
Free accounts are limited to 3 documents. This limit is enforced at creation time. Upgrade to Pro for unlimited documents.
curl -X POST https://api.unmarkdown.com/v1/documents \
-H "Authorization: Bearer um_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"title": "Weekly Report",
"content": "# Weekly Report\n\n## Summary\n\nKey highlights from this week.",
"template_id": "executive",
"theme_mode": "light"
}'
const response = await fetch(
"https://api.unmarkdown.com/v1/documents",
{
method: "POST",
headers: {
"Authorization": "Bearer um_your_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
title: "Weekly Report",
content: "# Weekly Report\n\n## Summary\n\nKey highlights from this week.",
template_id: "executive",
theme_mode: "light",
}),
}
);
const data = await response.json();
console.log(data.id);
import requests
response = requests.post(
"https://api.unmarkdown.com/v1/documents",
headers={"Authorization": "Bearer um_your_key_here"},
json={
"title": "Weekly Report",
"content": "# Weekly Report\n\n## Summary\n\nKey highlights from this week.",
"template_id": "executive",
"theme_mode": "light",
},
)
data = response.json()
print(data["id"])
Response 201 Created
{
"id": "d4f7a8b2-1234-5678-9abc-def012345678",
"title": "Weekly Report",
"template_id": "executive",
"theme_mode": "light",
"created_at": "2026-02-15T12:00:00.000Z"
}