POST/v1/documents

Create 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

ParameterTypeRequiredDefaultDescription
titlestringNo"Untitled"Document title
contentstringNo""Markdown content
template_idstringNo"swiss"Template ID for styling. See Templates
theme_modestringNo"light"Color theme: "light" or "dark"

Response

Returns the created document.

FieldTypeDescription
idstringDocument UUID
titlestringDocument title
template_idstringTemplate applied to the document
theme_modestringColor theme
created_atstringISO 8601 timestamp

Errors

StatusCodeDescription
400validation_errorInvalid request body
401unauthorizedMissing or invalid API key
403forbiddenFree tier document limit (3) reached. Upgrade to Pro for unlimited documents.
429rate_limitedRate limit or monthly quota exceeded
500internal_errorUnexpected 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"
}