JavaScript
import Morphik from 'morphik';
const client = new Morphik({
apiKey: process.env['MORPHIK_API_KEY'], // This is the default and can be omitted
});
const folder = await client.folders.create({ name: 'name' });
console.log(folder.id);curl https://api.morphik.ai/folders \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $MORPHIK_API_KEY" \
-d '{
"name": "name"
}'{
"name": "<string>",
"id": "<string>",
"full_path": "<string>",
"parent_id": "<string>",
"depth": 123,
"description": "<string>",
"document_ids": [
"<string>"
],
"system_metadata": {},
"summary_storage_key": "<string>",
"summary_version": 123,
"summary_bucket": "<string>",
"summary_updated_at": "<string>",
"app_id": "<string>",
"end_user_id": "<string>",
"child_count": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Folders
Create Folder
Create a new folder.
POST
/
folders
JavaScript
import Morphik from 'morphik';
const client = new Morphik({
apiKey: process.env['MORPHIK_API_KEY'], // This is the default and can be omitted
});
const folder = await client.folders.create({ name: 'name' });
console.log(folder.id);curl https://api.morphik.ai/folders \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $MORPHIK_API_KEY" \
-d '{
"name": "name"
}'{
"name": "<string>",
"id": "<string>",
"full_path": "<string>",
"parent_id": "<string>",
"depth": 123,
"description": "<string>",
"document_ids": [
"<string>"
],
"system_metadata": {},
"summary_storage_key": "<string>",
"summary_version": 123,
"summary_bucket": "<string>",
"summary_updated_at": "<string>",
"app_id": "<string>",
"end_user_id": "<string>",
"child_count": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Headers
Body
application/json
Response
Successful Response
Represents a folder that contains documents
Was this page helpful?

