Skip to content

Delete a document

DELETE /v1/default/banks/{bank_id}/documents/{document_id}

Delete a document and all its associated memory units and links.

This will cascade delete:

  • The document itself
  • All memory units extracted from this document
  • All links (temporal, semantic, entity) associated with those memory units

This operation cannot be undone.

Authentication required — include an Authorization: Bearer hsk_... header. See Authentication for details.

Path Parameters

NameTypeRequiredDescription
bank_idstringYes
document_idstringYes

Example Request

bash
curl -X DELETE 'https://api.hindsight.vectorize.io/v1/default/banks/your-bank-id/documents/your-document-id' \
  -H 'Authorization: Bearer hsk_your_api_key'

Responses

200 — Successful Response

json
{
  "document_id": "session_1",
  "memory_units_deleted": 5,
  "message": "Document 'session_1' and 5 associated memory units deleted successfully",
  "success": true
}

422 — Validation Error

json
{
  "detail": [
    {
      "loc": [
        null
      ],
      "msg": "Message",
      "type": "Error Type",
      "input": null,
      "ctx": {},
      "url": "URL"
    }
  ]
}

Source: /v1/default/banks/{bank_id}/documents/{document_id}