Getting Started
API Reference
- GETPing Health
- GETGet Available Models
- POSTRetrieve Chunks
- POSTRetrieve Chunks Grouped
- POSTRetrieve Documents
- POSTBatch Get Documents
- POSTBatch Get Chunks
- POSTQuery Completion
- GETGet Chat History
- GETGet Available Models For Selection
- POSTAgent Query
- GETGet Usage Stats
- GETGet Recent Usage
- POSTGenerate Local Uri
- POSTGenerate Cloud Uri
- DELDelete Cloud App
- GETList Chat Conversations
- PATCHUpdate Chat Title
Documents
Folders
Workflows
model-config
Logs
Graph
Documents
Update Document Metadata
Update only a document’s metadata.
Args: document_id: ID of the document to update metadata_updates: New metadata to merge with existing metadata auth: Authentication context
Returns: Document: Updated document metadata
POST
/
documents
/
{document_id}
/
update_metadata
JavaScript
Copy
Ask AI
import Morphik from 'morphik';
const client = new Morphik({
apiKey: 'My API Key',
});
const document = await client.documents.updateMetadata('document_id', { body: { foo: 'bar' } });
console.log(document.app_id);
Copy
Ask AI
{
"external_id": "<string>",
"content_type": "<string>",
"filename": "<string>",
"metadata": {},
"storage_info": {},
"storage_files": [
{
"bucket": "<string>",
"key": "<string>",
"version": 1,
"filename": "<string>",
"content_type": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
],
"system_metadata": {},
"additional_metadata": {},
"chunk_ids": [
"<string>"
],
"folder_name": "<string>",
"end_user_id": "<string>",
"app_id": "<string>"
}
Headers
Path Parameters
Body
application/json · Metadata Updates · object
Response
200
application/json
Successful Response
Represents a document stored in the database documents collection
Was this page helpful?
JavaScript
Copy
Ask AI
import Morphik from 'morphik';
const client = new Morphik({
apiKey: 'My API Key',
});
const document = await client.documents.updateMetadata('document_id', { body: { foo: 'bar' } });
console.log(document.app_id);
Copy
Ask AI
{
"external_id": "<string>",
"content_type": "<string>",
"filename": "<string>",
"metadata": {},
"storage_info": {},
"storage_files": [
{
"bucket": "<string>",
"key": "<string>",
"version": 1,
"filename": "<string>",
"content_type": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
],
"system_metadata": {},
"additional_metadata": {},
"chunk_ids": [
"<string>"
],
"folder_name": "<string>",
"end_user_id": "<string>",
"app_id": "<string>"
}
Assistant
Responses are generated using AI and may contain mistakes.