JavaScript
import Morphik from 'morphik';
const client = new Morphik({
apiKey: process.env['MORPHIK_API_KEY'], // This is the default and can be omitted
});
const documentDeleteResponse = await client.documents.delete('document_id');
console.log(documentDeleteResponse.message);curl https://api.morphik.ai/documents/$DOCUMENT_ID \
-X DELETE \
-H "Authorization: Bearer $MORPHIK_API_KEY"{
"status": "<string>",
"message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Documents
Delete Document
Delete a document and all associated data.
This endpoint deletes a document and all its associated data, including:
- Document metadata
- Document content in storage
- Document chunks and embeddings in vector store
DELETE
/
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 documentDeleteResponse = await client.documents.delete('document_id');
console.log(documentDeleteResponse.message);curl https://api.morphik.ai/documents/$DOCUMENT_ID \
-X DELETE \
-H "Authorization: Bearer $MORPHIK_API_KEY"{
"status": "<string>",
"message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Was this page helpful?

