Skip to main content
POST
Delete Source

When to use it

  • Cleanup – remove outdated documents
  • Right-to-deletion – fulfill GDPR/privacy requests for specific items
  • Reprocessing – delete then re-ingest after changing metadata schema or content
For removing user memories, use DELETE /memories/delete_memory. To remove an entire tenant, use DELETE /tenants/delete.
This operation is irreversible. Deleted sources cannot be recovered.

Endpoint

  • Auth: Bearer token
  • Idempotency: Re-sending a previously-deleted ID returns deleted: false for that item, but the request as a whole still returns 200.
  • Async: No
Why POST and not DELETE? This endpoint accepts a JSON body with an array of IDs. Some HTTP infrastructure strips bodies from DELETE requests, so HydraDB uses POST to ensure the bulk payload is reliably transmitted.

Example

Request parameters

Response

Behavior notes

Partial success is possible. A request can return success: true while some individual items fail. Always inspect results[] to confirm each deletion outcome – don’t rely on the top-level success flag alone.
Cascade scope. Deleting a knowledge source removes its chunks, embeddings, and any graph entities/relations exclusively associated with it. Entities shared with other sources are retained.

Errors

Common codes: 400 INVALID_PARAMETERS, 404 TENANT_NOT_FOUND, 422 VALIDATION_ERROR. See Error Responses for the full list.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request to delete sources by their IDs.

tenant_id
string
required
Example:

"tenant_1234"

ids
string[]
required

List of source IDs to delete.

Minimum array length: 1
Example:
sub_tenant_id
string | null
Example:

"sub_tenant_4567"

Response

Successful Response

Response for delete request.

success
boolean
default:true
Example:

true

message
string
default:Delete completed
results
SourceDeleteResultItem · object[]
Example:
deleted_count
integer
default:0

Number of sources deleted.

Example:

1