Skip to main content
POST
Creates an isolated database, optionally with a metadata schema. Creation is asynchronous: poll Database Status until infra.ready_for_ingestion is true before you ingest or query.

Request body

Metadata schema rules

  • Existing field names and types cannot change. Update Metadata Schema can add fields later.
  • Dense and sparse metadata search can only be enabled at database creation, with enable_dense_embedding and enable_sparse_embedding.
  • Each flag adds one vector field. A database can have at most six vector fields. Exceeding this limit or declaring an ARRAY field returns 400.

After creation

  1. Wait for provisioning: Poll Database Status until infra.ready_for_ingestion is true.
  2. Ingest: Start ingesting context. Ingesting with a new collection name creates that collection. Omitting collection uses the default collection, also created on first ingestion. No separate create call is needed.
  3. Query: Check ingestion status, and query once sources show graph_creation (searchable) or completed.
Failed provisioning: If the database appears in data.failed_databases from List Databases, address the reported issue, re-create the database with POST /databases, and poll status again before ingesting.

Errors

Common codes: 400 INVALID_INPUT (missing or invalid database, or an invalid schema), 403 FORBIDDEN (your plan’s database limit is reached), 409 DATABASE_ALREADY_EXISTS (the database is already in use; the deprecated POST /tenants route returns INVALID_INPUT instead), and 500 INTERNAL_ERROR (retry; if the message says the rollback also failed, delete the database first, then create it again). See Error Responses for the full list.

Authorizations

Authorization
string
header
required

Send your API key as Authorization: Bearer <your_api_key>.

Body

application/json

Database creation request

database
string

Name of the database to create. Formerly tenant_id, which is still accepted.

Example:

"acme_corp"

database_metadata_schema
TenantsCustomPropertyDefinition · object[]

Database-level metadata fields for exact-match filtering and semantic or BM25 search. Field names cannot change after creation.

Example:
embeddings_dimension
integer

Override for the embedding vector dimension. Default: 1536.

Example:

1536

is_embeddings_tenant
boolean

Internal flag for embedding-only databases.

Example:

false

tenant_id
string
deprecated

Deprecated: use database.

Example:

"tenant_1234"

tenant_metadata_schema
TenantsCustomPropertyDefinition · object[]
deprecated

Deprecated: use database_metadata_schema.

Response

OK

data
TenantsTenantCreateAcceptedResponse · object
Example:
error
HandlerApiError · object | null

Error details on failure, or null on success.

Example:

null

meta
HandlerResponseMeta · object
Example:
success
boolean

Whether the request succeeded.

Example:

true