import Morphik from 'morphik';
const client = new Morphik({
apiKey: process.env['MORPHIK_API_KEY'], // This is the default and can be omitted
});
const response = await client.folders.documents.add('document_id', {
folder_id_or_name: 'folder_id_or_name',
});
console.log(response.message);
{
"status": "<string>",
"message": "<string>"
}
Folders
Add Document To Folder
Add a document to a folder.
POST
/
folders
/
{folder_id_or_name}
/
documents
/
{document_id}
JavaScript
import Morphik from 'morphik';
const client = new Morphik({
apiKey: process.env['MORPHIK_API_KEY'], // This is the default and can be omitted
});
const response = await client.folders.documents.add('document_id', {
folder_id_or_name: 'folder_id_or_name',
});
console.log(response.message);