Create Document

Create a durable document from plain text, Markdown, or a Word .docx file.

Provide exactly one of content or file. Files must be base64 encoded. Text, Markdown, and Word ingestion completes synchronously. The returned id is the document ID used by every document, translation, and folder endpoint.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
titlestringOptional
Display title. Defaults to the file name without its extension or Untitled Document.
folder_idUUIDOptional
Optional owned folder. Null or omitted creates the document at root.
formatenumOptional

Source format. Defaults to text for content and is inferred from file_name for files.

Allowed values:
contentstringOptional

UTF-8 plain-text or Markdown content. Provide this or file, but not both.

filestringOptional

Base64-encoded .txt, .md, or .docx file. Provide this or content, but not both.

file_namestringOptional
Original file name. Used to infer format and title when those values are omitted.

Response

This endpoint returns an object.
idUUID
Stable document ID.
typestring
Document source type.
titlestring
Display title.
statusstring
Current document or processing status.
archivedboolean
Whether the document is archived.
created_atdatetime
Creation time.
folder_idUUIDOptional
Containing folder, or null for root.
updated_atdatetimeOptional
Last update time, when available.
textstringOptional
Visible plain text for completed text and transcript documents when available.
htmlstringOptional

Editor-compatible HTML for completed documents when available.

Errors

400
Invalid Document
401
Authentication Error
404
Folder Not Found
413
Document Too Large
429
Rate Limit Error