TypeScript SDK
Documents
Upsert Document
Create or update a document by filename. If a document with the given filename exists in the space, updates it. Otherwise creates a new document. Embeddings are generated synchronously - the document is immediately queryable.
PUT
TypeScript SDK
Authorizations
Body
application/json
Upsert document request
The ID of the space
Example:
"space_123"
Filename to create or update
Required string length:
1 - 255Example:
"my-notes.md"
The document content (max 10MB)
Required string length:
1 - 10000000Example:
"# My Notes\n\nSome content..."
Optional metadata to attach to the document