> ## Documentation Index
> Fetch the complete documentation index at: https://cortex-e852fafe-t3code-rewrite-docs-declutter.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Databases - Overview

> Quick reference for all databases endpoints, their lifecycle, and when to call each.

Databases are physically isolated spaces for storing context. In most integrations you create a database once, wait for provisioning, then ingest and query inside it.

## Endpoint references

| Endpoint | Method | SDK method | Purpose | Async? |
| - | - | - | - | - |
| [`/databases`](/api-reference/v2/endpoint/create-tenant) | `POST` | `databases.create` | Create a new isolated workspace | Yes |
| [`/databases`](/api-reference/v2/endpoint/delete-tenant) | `DELETE` | `databases.delete` | Permanently remove a database | Yes |
| [`/databases`](/api-reference/v2/endpoint/list-tenants) | `GET` | `databases.list` | List all databases for the organization | No |
| [`/databases/status`](/api-reference/v2/endpoint/tenant-status) | `GET` | `databases.status` | Check provisioning readiness | No |
| [`/databases/stats`](/api-reference/v2/endpoint/tenant-stats) | `GET` | `databases.stats` | Monitor database load | No |
| [`/databases/collections`](/api-reference/v2/endpoint/list-sub-tenants) | `GET` | TypeScript: `databases.collections`<br />Python: `databases.collections` | List active collections | No |
| [`/databases/collections`](/api-reference/v2/endpoint/delete-collection) | `DELETE` | TypeScript: `databases.deleteCollection`<br />Python: `databases.delete_collection` | Permanently remove one collection | Yes |

## Typical call sequence

For a new database from scratch:

1. Create the database: `POST /databases`
2. Wait for provisioning: `GET /databases/status` until `scheduler_status`, `graph_status`, `vectorstore_status.knowledge`, and `vectorstore_status.memories` are all `true`
3. Ingest content: `POST /context/ingest`
4. Wait for indexing: `GET /context/status` until sources are searchable
5. Retrieve context: `POST /query`
6. Inspect usage: `GET /databases/stats`
7. Delete: `DELETE /databases`

For routine operations on an existing database:

```text theme={"dark"}
GET /databases             -> list databases in the org
GET /databases/collections -> list active collections
GET /databases/stats       -> check database health & growth
```

## Key concepts

* **Database** - A top-level isolated space. For example - you can dedicate one database to one enterprise customer.
* **Collection** - Partitions within a database for per-user separation. The first collection is created implicitly at ingestion. Collections are useful when you need to scope data per user, team, or customer within a single database.
* **Database Metadata & Schema** - Structured fields defined at database creation to enable query-time filtering.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.