Create Database
Creates a space for storing context.
Request body
database and collection are the current field names (formerly tenant_id and sub_tenant_id). The old names remain accepted as deprecated aliases for full backward compatibility.Successful response
Always check if a database is ready before using it. Use Database Status to check.What happens after database creation?
- Create the database with
POST /databases - Default collection: A default collection is provisioned automatically when a database is created. This default collection stores all your context. Create additional collections at any time to scope data to users, teams, or projects.
- Retry failed databases: If a database appears in
data.failed_databases, re-create that database withPOST /databasesafter addressing the reported issue. Poll status again before ingestion. - Start ingesting context once databases are ready
- Check status of ingestion. Start querying the database once the recently ingested sources show
completed
Defining metadata schema
You can define a custom schema at database creation to enable exact-match metadata filtering (enable_match) or semantic/BM25 search over metadata text fields (enable_dense_embedding / enable_sparse_embedding).
For detailed parameters, valid data types, limits, shorthand flags, and comprehensive examples, see the metadata guide.
Related Resources
- Next: Database Status - poll until provisioning completes
- Next: Ingest Context - start ingesting data once status is ready
- Related: Update Metadata Schema - add metadata schema fields later
- Related: Delete Database - teardown
- Read more: Concepts → Multi-Tenant Support
- Read more: Usage → Metadata
Authorizations
API key sent as a Bearer token: "Bearer prefix.secret"
Body
Database creation request
Database is the canonical v2 name; TenantID is its deprecated alias and remains fully accepted. The TenantAliases middleware reconciles them before this binds, so TenantID is always populated.
"acme_corp"
Defines database-level metadata fields for exact-match filtering and semantic/BM25 search. Canonical name; tenant_metadata_schema is a deprecated alias. Schema field names are immutable after database creation.
Override for the embedding vector dimension. Default: 1536.
1536
Internal flag for embedding-only databases.
false
deprecated: use database
"tenant_1234"
deprecated: use database_metadata_schema