Floreal Logo

Delete Document

Permanently delete a CV and all associated data

⚠️ This action is irreversible - the document and all extracted data will be permanently removed.


What Gets Deleted

This endpoint removes the document from 3 locations:

  1. Database - Document record, metadata, and all extracted CV data
  2. Cloud Storage (S3) - Original PDF/DOC/DOCX file
  3. Vector Database - Search embeddings (dense + sparse vectors)

Response

{
  "message": "Document deleted successfully",
  "documentId": "789e4567-e89b-12d3-a456-426614174000",
  "documentName": "Benjamin Gabay - CV",
  "deleted": {
    "database": true,
    "storage": true,
    "searchIndex": {
      "denseVectors": 12,
      "sparseVectors": 12
    }
  }
}

Fields:

  • database - Document record deleted
  • storage - S3 file deleted
  • searchIndex - Number of vectors removed from Pinecone

Examples

cURL

curl -X DELETE "https://api.floreal.ai/v1/public/documents/789e4567-..." \
  -H "X-API-Key: YOUR_API_KEY"

JavaScript

const response = await fetch(
  '/v1/public/documents/789e4567-e89b-12d3-a456-426614174000',
  {
    method: 'DELETE',
    headers: { 'X-API-Key': 'YOUR_API_KEY' }
  }
);

if (response.ok) {
  const result = await response.json();
  console.log('✅ Deleted:', result.documentName);
  console.log('Vectors removed:', result.deleted.searchIndex.denseVectors);
}

Error Responses

StatusErrorSolution
404Document not foundVerify documentId is correct
403Access deniedDocument belongs to different organization
500Deletion failedRetry or contact support

Important Notes

⚠️ Permanent - Cannot be undone ⚠️ Immediate - Document removed from search results instantly ⚠️ Complete - Removes from database, storage, and search index ⚠️ No backup - Make sure you have backups if needed


After deletion:

  • GET /v1/public/documents/{documentId} returns 404
  • Document no longer appears in search results
  • All vectors removed from search index
DELETE
/v1/public/documents/{documentId}
X-API-Key<token>

API key for public API access. Get yours at https://app.floreal.ai?tab=api

In: header

Path Parameters

documentIdstring
Formatuuid

Response Body

curl -X DELETE "https://api.floreal.ai/v1/public/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{
  "message": "Document deleted successfully",
  "documentId": "4704590c-004e-410d-adf7-acb7ca0a7052",
  "documentName": "string",
  "deleted": {
    "database": true,
    "storage": true,
    "searchIndex": true
  }
}
{
  "error": "string",
  "message": "string"
}
{
  "error": "string"
}
{
  "error": "string",
  "message": "string"
}