Valori LogoValori
POST/v1/soft-deleteREAD / WRITE

Soft-delete a record

Tombstones a record so it stops appearing in search, without freeing its slot or losing audit history.

Tombstones the record: it stops appearing in search results, but its slab slot and audit history are retained — unlike Delete a record, which frees the slot immediately. Use soft-delete when you want the record gone from results but still want a complete history of what the collection contained.

Request body

idintegerrequired

Id of the record to tombstone.

collectionstringoptional

Collection the record belongs to. Optional at the HTTP level — pass it explicitly.

Response fields

successbooleanoptional

true on success.

log_indexintegeroptional

Raft log index of the committed tombstone. Present only in cluster mode.

The Python SDK's soft_delete() returns None on success and raises on failure. The TypeScript SDK's softDelete() returns the full response object above.

Errors

StatuscodeMeaning
400validation_errorMalformed request body.
401unauthorizedMissing or invalid API key.
403forbiddenThe key's scope doesn't include read_write.
404record_not_found, collection_not_foundThe record or collection doesn't exist.
500internal_errorCommit or audit-chain failure.

Related endpoints

POST /v1/soft-delete
curl -X POST "https://app.valori.systems/v1/soft-delete" \
  -H "Authorization: Bearer vlk_your_project_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "collection": "documents",
    "id": 42
  }'
200
{
  "success": true
}