Skip to content

Collections

Show:

The Collections API is a deprecated v1 compatibility surface for older clients and SDKs. Internally, collections and buckets refer to the same underlying storage object, and collection search delegates to bucket search.

Note: For new integrations, use Buckets and POST /v2/buckets/\{bucket_id\}/search instead of the routes documented here.

VersionStatusPath prefixGuidance
v1Deprecated/v1/collections/*Compatibility only. No new features will be added.
v2Current/v2/buckets/*Use for all new integrations.

The v1 collection search endpoint returns Deprecation: true, Warning, and Link successor-version headers pointing to POST /v2/buckets/\{bucket_id\}/search.

All collection API endpoints require an API key in the Authorization header:

Authorization: Bearer sch_xxxxxxxxxxxxxxxxxxxx

Each endpoint also requires a specific API key scope:

ScopeAccess
collections:manageCreate and delete collections.
collections:readList collections, get a collection, or read stats.
collections:useUpsert or delete vectors.
embedEmbed and upsert documents (/documents and /add).
querySearch a collection.

Dashboard session routes under /v1/organizations/\{org_id\} require a signed-in user who is a member of the target organization.

FieldTypeDescription
idstringUnique collection identifier.
namestringHuman-readable collection name.
dimensionintegerEmbedding dimension of the collection.
modelstringEmbedding model used for the collection.
backendstringVector backend, for example engine.
vector_countintegerNumber of indexed vectors.

Create a new collection. The collection name must be unique within the organization.

FieldTypeRequiredDefaultDescription
namestringYesCollection name.
dimensionintegerYesVector dimension for the collection.
modelstringNoschift-embed-1-smallEmbedding model to use.
backendstringNoengineVector backend. Supported values: engine, pgvector, weaviate, qdrant, pinecone, milvus, chroma, elasticsearch, redis, mongodb.
{
"name": "legacy-faq",
"dimension": 1024,
"model": "schift-embed-1-small",
"backend": "engine"
}
{
"id": "abc123def456",
"name": "legacy-faq",
"dimension": 1024,
"model": "schift-embed-1-small",
"backend": "engine",
"vector_count": 0
}
StatusCause
400Invalid backend or request body.
403API key lacks the collections:manage scope.
409A collection with this name already exists.

List collections for the authenticated organization.

[
{
"id": "abc123def456",
"name": "legacy-faq",
"dimension": 1024,
"model": "schift-embed-1-small",
"backend": "engine",
"vector_count": 128
}
]
StatusCause
403API key lacks the collections:read scope.

Get a single collection by name.

ParameterTypeDescription
namestringCollection name.
{
"id": "abc123def456",
"name": "legacy-faq",
"dimension": 1024,
"model": "schift-embed-1-small",
"backend": "engine",
"vector_count": 128
}
StatusCause
403API key lacks the collections:read scope.
404Collection not found.

Return the current vector count and metadata for a collection. The count is read directly from the vector backend and the stored count is refreshed.

ParameterTypeDescription
namestringCollection name.
{
"name": "legacy-faq",
"dimension": 1024,
"model": "schift-embed-1-small",
"backend": "engine",
"vector_count": 128
}
StatusCause
403API key lacks the collections:read scope.
404Collection not found.

Delete a collection and drop its vector table.

ParameterTypeDescription
namestringCollection name.

Returns 204 No Content on success.

StatusCause
403API key lacks the collections:manage scope.
404Collection not found.

Upsert raw vectors into a collection. Each vector id is replaced if it already exists.

Note: Maximum batch size is 2048 vectors per request.

ParameterTypeDescription
collectionstringCollection name.
FieldTypeRequiredDescription
vectorsobject[]YesArray of vector items.
vectors[].idstringYesUnique vector identifier.
vectors[].valuesnumber[]YesEmbedding values. Must match the collection dimension.
vectors[].metadataobjectNoFree-form metadata.
{
"vectors": [
{
"id": "vec-1",
"values": [0.01, -0.02, 0.03],
"metadata": {"source": "faq"}
}
]
}
{
"upserted": 1
}
StatusCause
400Batch size exceeds 2048, or vector dimension does not match the collection.
402Quota exceeded.
403API key lacks the collections:use scope.
404Collection not found.

DELETE /v1/collections/{collection}/vectors

Section titled “DELETE /v1/collections/{collection}/vectors”

Delete specific vectors from a collection by their IDs.

ParameterTypeDescription
collectionstringCollection name.
FieldTypeRequiredDescription
idsstring[]YesVector IDs to delete. Must not be empty.
{
"ids": ["vec-1", "vec-2"]
}
{
"deleted": 2
}
StatusCause
400ids is empty.
403API key lacks the collections:use scope.
404Collection not found.
501The configured backend does not support vector deletion by ID.

POST /v1/collections/{collection}/documents

Section titled “POST /v1/collections/{collection}/documents”

Embed documents and store the resulting vectors in a collection. The request body includes the target embedding model.

Note: Maximum batch size is 2048 documents per request.

ParameterTypeDescription
collectionstringCollection name.
FieldTypeRequiredDescription
documentsobject[]YesArray of document items.
documents[].idstringNoDocument identifier. Generated if omitted.
documents[].textstringYesText to embed.
documents[].metadataobjectNoFree-form metadata.
modelstringYesEmbedding model ID.
{
"documents": [
{
"id": "doc-1",
"text": "How do I reset my password?",
"metadata": {"category": "support"}
}
],
"model": "schift-embed-1-small"
}
{
"upserted": 1
}
StatusCause
400Batch size exceeds 2048, or the embedding model is unknown.
402Quota exceeded.
403API key lacks the required collections:use or embed scope.
404Collection not found.

Embed documents and add them to a collection. If the collection does not exist, it is auto-created with dimension=1024, model=schift-embed-1-small, and backend=engine.

Note: Maximum batch size is 2048 documents per request.

ParameterTypeDescription
namestringCollection name.
FieldTypeRequiredDefaultDescription
documentsstring[]YesRaw text strings to embed. Must not be empty.
idsstring[]NonullOptional document IDs.
metadataobject[]NonullOptional metadata objects, one per document.
taskstringNonullEmbedding task. One of: retrieval_query, retrieval_document, semantic_similarity, question_answering, clustering, classification, code_retrieval.
modelstringNoschift-embed-1-smallEmbedding model ID.
{
"documents": [
"How do I reset my password?",
"Where can I download invoices?"
],
"metadata": [
{"category": "support"},
{"category": "billing"}
],
"model": "schift-embed-1-small"
}
{
"collection": "legacy-faq",
"added": 2,
"ids": ["id-1", "id-2"]
}
StatusCause
400documents is empty or batch size exceeds 2048.
402Quota exceeded.
403Embedding entitlement limit reached, or API key lacks the required scope.

Search a collection. This endpoint is a compatibility wrapper over bucket search and returns a simplified response.

ParameterTypeDescription
namestringCollection name.
FieldTypeRequiredDefaultDescription
querystringNo*Text query. Either query or query_vector is required.
query_vectornumber[]No*Pre-computed query vector.
taskstringNonullEmbedding task. See valid task values.
top_kintegerNo10Number of results to return. Max 1000.
filterobjectNonullMetadata filter.
modelstringNonullEmbedding or rerank model override.
modestringNohybridSearch mode: vector or hybrid.
rerankbooleanNofalseEnable reranking.
rerank_top_kintegerNonullTop-k cutoff for reranking.
rerank_modelstringNonullReranker model ID.
temporalstringNonullTemporal filter: before, after, between, as_of, or latest.
temporal_startintegerNonullRequired when temporal is set (except latest).
temporal_endintegerNonullRequired when temporal=between.
advancedobjectNonullAdvanced scoring params: graph_weight, temporal_weight, hit_weight, vector_weight, bm25_weight, hops, temporal_half_life_days.
expand_contextobjectNonullContext expansion params: window, max_extra, score_decay.
{
"query": "reset password",
"top_k": 5,
"filter": {"category": "support"},
"mode": "hybrid"
}
{
"collection": "legacy-faq",
"results": [
{
"id": "doc-1",
"score": 0.92,
"text": "How do I reset my password?",
"metadata": {"category": "support"},
"neighbors": null,
"citation": null
}
]
}

The response also includes deprecation headers pointing to the v2 bucket search successor:

Deprecation: true
Warning: 299 - "Deprecated search endpoint; migrate to /v2/buckets/{bucket_id}/search"
Link: </v2/buckets/abc123def456/search>; rel="successor-version"
StatusCause
400Neither query nor query_vector provided, or invalid temporal parameters.
402Quota exceeded.
403Search entitlement limit reached, or API key lacks the required scope.
404Collection not found.

These routes are used by the Schift dashboard and rely on session authentication. The calling user must be a member of \{org_id\}.

GET /v1/organizations/{org_id}/collections

Section titled “GET /v1/organizations/{org_id}/collections”

List collections in the organization.

GET /v1/organizations/{org_id}/collections/{name}

Section titled “GET /v1/organizations/{org_id}/collections/{name}”

Get a single collection in the organization.

POST /v1/organizations/{org_id}/collections

Section titled “POST /v1/organizations/{org_id}/collections”

Create a collection in the organization.

FieldTypeRequiredDefaultDescription
namestringYesCollection name.
modelstringNoschift-embed-1-smallEmbedding model.
dimensionintegerNomodel default or 1024Vector dimension.
backendstringNoengineVector backend.
StatusCause
400Missing name or unsupported backend.
403User is not an organization member, or the collection limit for the plan was reached.

DELETE /v1/organizations/{org_id}/collections/{name}

Section titled “DELETE /v1/organizations/{org_id}/collections/{name}”

Delete a collection in the organization. Returns 204 No Content.

GET /v1/organizations/{org_id}/collections/{name}/stats

Section titled “GET /v1/organizations/{org_id}/collections/{name}/stats”

Return collection stats, including the live vector count.

GET /v1/organizations/{org_id}/vectordb-configs

Section titled “GET /v1/organizations/{org_id}/vectordb-configs”

List organization-level VectorDB configurations.

PUT /v1/organizations/{org_id}/vectordb-configs

Section titled “PUT /v1/organizations/{org_id}/vectordb-configs”

Create or update a VectorDB configuration for a backend.

FieldTypeRequiredDescription
collection_idstringYesTarget collection ID.
backendstringYesBackend name. Must be supported.
endpointstringNoBackend endpoint URL.
api_keystringNoBackend credentials.
extraobjectNoAdditional backend-specific options.
{
"status": "ok"
}
StatusCause
400Unsupported backend.
403User is not an organization member.