response = client.databases.delete(database="database_to_delete")
const response = await client.databases.delete({
database: "database_to_delete",
});
curl -X DELETE 'https://api.hydradb.com/databases?database=database_to_delete' \
-H "Authorization: Bearer <your_api_key>" \
-H "API-Version: 2"
{
"success": true,
"data": {
"database": "database_to_delete",
"status": "deletion_scheduled",
"message": "Database deregistered. Background cleanup is in progress."
},
"error": null,
"meta": {
"request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d",
"latency_ms": 12.3
}
}
{
"success": false,
"data": null,
"error": {
"code": "DATABASE_NOT_FOUND",
"message": "Database not found"
},
"meta": {
"request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d",
"latency_ms": 4.8
}
}
Databases
Delete Database
Permanently remove a database and all of its data.
DELETE
/
databases
response = client.databases.delete(database="database_to_delete")
const response = await client.databases.delete({
database: "database_to_delete",
});
curl -X DELETE 'https://api.hydradb.com/databases?database=database_to_delete' \
-H "Authorization: Bearer <your_api_key>" \
-H "API-Version: 2"
{
"success": true,
"data": {
"database": "database_to_delete",
"status": "deletion_scheduled",
"message": "Database deregistered. Background cleanup is in progress."
},
"error": null,
"meta": {
"request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d",
"latency_ms": 12.3
}
}
{
"success": false,
"data": null,
"error": {
"code": "DATABASE_NOT_FOUND",
"message": "Database not found"
},
"meta": {
"request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d",
"latency_ms": 4.8
}
}
Permanently deletes a database and everything in it: ingested knowledge, memories, the metadata schema, vector indices, and graphs.
This action is irreversible. There is no soft-delete and no recovery window. The examples use a placeholder name,
database_to_delete. Replace it with the database you mean to destroy before running them, and check the name twice on a shared or team account, where you may not be the only one using it.response = client.databases.delete(database="database_to_delete")
const response = await client.databases.delete({
database: "database_to_delete",
});
curl -X DELETE 'https://api.hydradb.com/databases?database=database_to_delete' \
-H "Authorization: Bearer <your_api_key>" \
-H "API-Version: 2"
{
"success": true,
"data": {
"database": "database_to_delete",
"status": "deletion_scheduled",
"message": "Database deregistered. Background cleanup is in progress."
},
"error": null,
"meta": {
"request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d",
"latency_ms": 12.3
}
}
{
"success": false,
"data": null,
"error": {
"code": "DATABASE_NOT_FOUND",
"message": "Database not found"
},
"meta": {
"request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d",
"latency_ms": 4.8
}
}
Deletion completion
Deletion is asynchronous: the endpoint returns once the database is deregistered, and cleanup of vector stores, graphs, and storage objects runs in the background for a few minutes. Treat deletion as complete when the database no longer appears inGET /databases, or when GET /databases/status?database=... returns DATABASE_NOT_FOUND.
Reusing the database name: After deletion completes, the same database can be used in a new POST /databases request. Until then, do not re-create the database or retry ingestion or queries against it.
Stop in-flight work first: Stop all ingestion, polling, query, and background jobs targeting this database before deleting. Calls made after deregistration can fail with DATABASE_NOT_FOUND even while infrastructure cleanup is still running.
Repeat calls: Deleting an already-deleted database returns 404 DATABASE_NOT_FOUND. Deleting a database that is still deleting returns 200 again. Deleting a database that is still provisioning, or whose provisioning or earlier deletion failed, is treated as a request to tear down that database.
Errors
Common codes:400 INVALID_INPUT (missing database), 401 UNAUTHORIZED, 404 DATABASE_NOT_FOUND, and 500 INTERNAL_ERROR (transient; retry the same DELETE). See Error Responses for the full list.
Related resources
- Before this: List Databases: find the database ID
- Related: Delete Collection: remove one collection without deleting the whole database
- Related: Delete Context: remove specific knowledge or memories without deleting the whole database
- Guide: Databases and Collections
Authorizations
Send your API key as Authorization: Bearer <your_api_key>.
Query Parameters
Database identifier to delete
Example:
"acme_corp"
Response
OK
Show child attributes
Show child attributes
Example:
{
"database": "acme_corp",
"message": "Success",
"status": "completed",
"tenant_id": "tenant_1234"
}
Error details on failure, or null on success.
Show child attributes
Show child attributes
Example:
null
Show child attributes
Show child attributes
Example:
{
"collection": "team_docs",
"database": "acme_corp",
"latency_ms": 12.3,
"request_id": "9d13aef4-02f4-4e73-8c62-4c2601d04f9d",
"source_type": "file",
"sub_tenant_id": "sub_tenant_4567",
"tenant_id": "tenant_1234",
"warnings": [
{
"code": "acl_ignored_by_connector_enforcement",
"message": "This connector enforces ACL, so the request's acl was ignored."
}
]
}
Whether the request succeeded.
Example:
true
Was this page helpful?
