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.
title
Display title. Defaults to the file name without its extension or Untitled Document.
folder_id
Optional owned folder. Null or omitted creates the document at root.
format
Source format. Defaults to text for content and is inferred from file_name for files.
Allowed values:
content
UTF-8 plain-text or Markdown content. Provide this or file, but not both.
file
Base64-encoded .txt, .md, or .docx file. Provide this or content, but not both.
file_name
Original file name. Used to infer format and title when those values are omitted.
Response
This endpoint returns an object.
id
Stable document ID.
type
Document source type.
title
Display title.
status
Current document or processing status.
archived
Whether the document is archived.
created_at
Creation time.
folder_id
Containing folder, or null for root.
updated_at
Last update time, when available.
text
Visible plain text for completed text and transcript documents when available.
html
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
