Show: All versions v2 only
A bucket is Schift’s public knowledge-storage surface. Use buckets to upload documents, check indexing readiness, search answer-ready context with citations, and manage the documents that belong to a knowledge base.
Note: All bucket endpoints require an Authorization: Bearer <SCHIFT_API_KEY> header. Endpoints that create, modify, or delete buckets or documents require the buckets:manage scope. Read and search endpoints accept any valid API key subject to organization limits.
The public product API is v2 . New integrations should use the /v2/buckets/* routes documented below.
The older /v1/buckets/* routes are a deprecated compatibility surface for existing clients. They continue to work, but v1 search endpoints return Deprecation and Link successor-version headers pointing to the v2 equivalents. Public buckets are read-only on both versions.
Field Type Description idstringUnique bucket identifier. namestringHuman-readable bucket name. descriptionstringOptional description. dimensionintegerEmbedding dimension configured for the bucket. modelstringEmbedding model used for the bucket. backendstringVector backend, for example engine. file_countintegerNumber of uploaded documents. vector_countintegerNumber of indexed vectors. active_job_countintegerNumber of in-progress jobs for this bucket. created_atstringISO 8601 creation timestamp. default_privacy_levelintegerDefault privacy level for bucket content. max_privacy_levelintegerMaximum privacy level allowed. external_max_privacy_levelintegerMaximum privacy level exposed externally. enforce_access_policybooleanWhether access policies are enforced. scope_by_departmentbooleanWhether access is scoped by department metadata.
Create a new bucket. Schift auto-configures the embedding model, dimension, and backend.
Field Type Required Default Description namestringYes — Bucket name. Must not start with __schift_. descriptionstringNo ""Optional description. metadataobjectNo nullFree-form user metadata. default_privacy_levelintegerNo 3Default privacy level. max_privacy_levelintegerNo 10Maximum privacy level. external_max_privacy_levelintegerNo 1External privacy ceiling. enforce_access_policybooleanNo trueEnable access-policy enforcement. scope_by_departmentbooleanNo falseScope access by department.
"description" : " Product support knowledge "
"id" : " bucket_01J8X1234567890ABCDEF " ,
"description" : " Product support knowledge " ,
"model" : " text-embedding-3-large " ,
"created_at" : " 2026-06-19T05:00:00Z " ,
"default_privacy_level" : 3 ,
"external_max_privacy_level" : 1 ,
"enforce_access_policy" : false ,
"scope_by_department" : false
Status Cause 400Invalid request body. 403Bucket name uses the reserved __schift_ namespace. 409A bucket with this name already exists.
List buckets for the authenticated organization.
"id" : " bucket_01J8X1234567890ABCDEF " ,
"description" : " Product support knowledge " ,
"model" : " text-embedding-3-large " ,
"created_at" : " 2026-06-19T05:00:00Z " ,
"default_privacy_level" : 3 ,
"external_max_privacy_level" : 1 ,
"enforce_access_policy" : false ,
"scope_by_department" : false
Retrieve a single bucket by ID.
Parameter Type Required Description bucket_idstringYes Bucket identifier.
Same shape as the POST /v2/buckets response.
Status Cause 404Bucket not found or not accessible.
Modify mutable bucket fields. Currently supports renaming, updating the description, and updating metadata including privacy policy fields.
Parameter Type Required Description bucket_idstringYes Bucket identifier.
All fields are optional.
Field Type Description namestringNew bucket name. descriptionstringNew description. metadataobjectFree-form metadata merged into existing metadata. default_privacy_levelintegerDefault privacy level. max_privacy_levelintegerMaximum privacy level. external_max_privacy_levelintegerExternal privacy ceiling. enforce_access_policybooleanEnable access-policy enforcement. scope_by_departmentbooleanScope access by department.
"description" : " Updated product support knowledge "
Same shape as the POST /v2/buckets response.
Status Cause 403Public buckets are read-only. 404Bucket not found. 409The new bucket name is already taken.
Queue a bucket for deletion. Deletion is performed asynchronously and returns a job ID.
Parameter Type Required Description bucket_idstringYes Bucket identifier.
"bucket_id" : " bucket_01J8X1234567890ABCDEF " ,
"job_id" : " job_01J8Y1234567890ABCDEF " ,
"delete_requested_at" : " 2026-06-19T05:05:00Z "
Status Cause 403Public buckets are read-only. 404Bucket not found.
List the child collections inside a bucket.
Parameter Type Required Description bucket_idstringYes Bucket identifier.
"id" : " col_01J8X1234567890ABCDEF " ,
"bucket_id" : " bucket_01J8X1234567890ABCDEF " ,
"name" : " migration-guides " ,
"model" : " text-embedding-3-large " ,
Status Cause 404Bucket not found.
Check whether a bucket is ready to answer questions. This endpoint returns a consumer-facing readiness summary without running a search.
Parameter Type Required Description bucket_idstringYes Bucket identifier.
"operational_status" : " ready " ,
"bucket_id" : " product-docs " ,
"last_indexed_at" : " 2026-06-19T04:55:00Z " ,
"backfill_required" : false
Status Cause 404Bucket not found.
Run the managed knowledge-search pipeline and return answer-ready context with citations. Callers do not need to choose embedding routes, vector modes, or rerank machinery.
Parameter Type Required Description bucket_idstringYes Bucket identifier.
Field Type Required Default Description querystringYes — Question to ask against the bucket. top_kintegerNo 8Maximum cited passages to return. Range 1–100. context_budgetintegerNo 2000Approximate maximum context size in tokens. Range 100–32000. filtersobjectNo nullMetadata filters. See Filters . options.rerank.enabledbooleanNo trueImprove citation ordering before context assembly. options.rerank.top_kintegerNo nullCandidate passages to rerank. Range 1–1000. options.instructions.taskstringNo nullSearch instruction preset such as retrieval_query.
"query" : " How do I migrate embedding models? " ,
"filters" : { "product" : " schift " },
"rerank" : { "enabled" : true , "top_k" : 20 },
"instructions" : { "task" : " retrieval_query " }
"operational_status" : " ready " ,
"bucket_id" : " product-docs " ,
"query" : " How do I migrate embedding models? " ,
"context" : " [1] Migration guide excerpt... " ,
"document_id" : " doc_042 " ,
"title" : " Migration Guide " ,
Status Cause 400Invalid filter or request body. 402Search quota exceeded. 403Search quota unavailable or plan restriction. 404Bucket not found.
Search a single collection within a bucket using the raw v2 search contract. This is useful when you want results from a specific child collection rather than the whole bucket.
Parameter Type Required Description bucket_idstringYes Bucket identifier. collection_idstringYes Collection identifier.
Field Type Required Default Description querystringYes* ""Text query. Either query or queryVector is required. queryVectornumber[]Yes* nullRaw embedding vector. topKintegerNo 10Maximum results. Range 1–1000. modelstringNo nullEmbedding model override. filterobjectNo nullMetadata filter. accessModestringNo autoOne of auto, internal, external. raw is internal-only. modestringNo hybridvector or hybrid.rerankbooleanNo falseEnable reranking. rerankTopKintegerNo nullCandidate count for reranking. minScorenumberNo nullMinimum result score. Range 0–1. debugbooleanNo falseInclude debug timing and scores.
"bucket_id" : " product-docs " ,
"search_id" : " search_01J8X1234567890ABCDEF " ,
"text" : " Migration guide excerpt... " ,
"metadata" : { "document_id" : " doc_042 " },
Status Cause 400Missing query or queryVector, or invalid temporal parameters. 403raw retrieval mode is internal-only.404Bucket or collection not found.
Upload one or more files into a bucket. Uploaded files are extracted, chunked, embedded, and indexed asynchronously. This endpoint accepts multipart/form-data.
Parameter Type Required Description bucket_idstringYes Bucket identifier.
Field Type Required Default Description filesfileYes — One or more files. PDFs, Markdown, text, Office documents, and images are supported. ocr_strategystringNo autoOCR strategy for image-based documents. chunk_sizeintegerNo 512Target chunk size. Range 64–8192. chunk_overlapintegerNo 50Chunk overlap. Range 0–512. metadatastringNo nullJSON-stringified object attached to every uploaded file. collection_idstringNo nullTarget child collection. Defaults to the bucket.
curl -X POST ${ API_BASE_URL } /v2/buckets/product-docs/documents \
-H " Authorization: Bearer $SCHIFT_API_KEY " \
-F ' metadata={"source":"support","product":"schift"} '
"job_id" : " job_01J8X1234567890ABCDEF " ,
"document_id" : " doc_01J8X1234567890ABCDEF " ,
"file_name" : " manual.pdf " ,
"total_estimated_cost" : 0.05
Status Cause 400Unsupported file type or invalid form data. 403API key lacks the buckets:manage scope. 404Bucket not found. 413File or request exceeds upload limits.
List documents in a bucket.
Parameter Type Required Description bucket_idstringYes Bucket identifier.
Parameter Type Required Default Description statusstringNo — Filter by document status. limitintegerNo 50Maximum results. Range 1–500.
"id" : " doc_01J8X1234567890ABCDEF " ,
"bucket_id" : " product-docs " ,
"file_name" : " manual.pdf " ,
"metadata" : { "source" : " support " , "product" : " schift " },
"latest_job_id" : " job_01J8X1234567890ABCDEF " ,
"latest_successful_job_id" : " job_01J8X1234567890ABCDEF " ,
"last_error_summary" : null ,
"created_at" : " 2026-06-19T04:00:00Z " ,
"updated_at" : " 2026-06-19T04:05:00Z "
Status Cause 404Bucket not found.
Retrieve a single document by ID.
Parameter Type Required Description bucket_idstringYes Bucket identifier. document_idstringYes Document identifier.
Same shape as a single item in the GET /v2/buckets/{bucket_id}/documents response.
Status Cause 404Bucket or document not found.
Update a document’s metadata. Changes that affect search visibility trigger a reindex by default.
Parameter Type Required Description bucket_idstringYes Bucket identifier. document_idstringYes Document identifier.
Field Type Required Default Description metadataobjectNo {}Metadata to merge. public_accessiblebooleanNo nullWhether the document is publicly accessible. privacy_levelintegerNo nullPrivacy level. Range 1–10. classificationstringNo nullOne of internal, public, restricted, confidential. review_statusstringNo nullOne of pending, approved, rejected. reindexbooleanNo trueQueue reindexing after the update.
Same shape as the GET /v2/buckets/{bucket_id}/documents/{document_id} response.
Status Cause 400Invalid metadata. 404Bucket or document not found.
Queue a document for hard deletion. Deletion is performed asynchronously and returns a job ID.
Parameter Type Required Description bucket_idstringYes Bucket identifier. document_idstringYes Document identifier.
"bucket_id" : " product-docs " ,
"document_id" : " doc_01J8X1234567890ABCDEF " ,
"job_id" : " job_01J8Y1234567890ABCDEF " ,
"delete_requested_at" : " 2026-06-19T05:10:00Z "
Status Cause 404Bucket or document not found.
List metadata keys that appear across documents in a bucket, together with their most common values.
Parameter Type Required Description bucket_idstringYes Bucket identifier.
Parameter Type Required Default Description limitintegerNo 500Maximum documents scanned for keys. Range 1–2000. values_per_keyintegerNo 20Maximum values returned per key. Range 0–100.
"bucket_id" : " product-docs " ,
{ "value" : " schift " , "count" : 10 },
{ "value" : " docs " , "count" : 2 }
Status Cause 404Bucket not found.
List the values observed for a specific metadata key.
Parameter Type Required Description bucket_idstringYes Bucket identifier. keystringYes Metadata key.
Parameter Type Required Default Description limitintegerNo 100Maximum distinct values. Range 1–1000. document_limitintegerNo 2000Maximum documents scanned. Range 1–10000.
"bucket_id" : " product-docs " ,
{ "value" : " schift " , "count" : 10 },
{ "value" : " docs " , "count" : 2 }
Status Cause 404Bucket not found or metadata key not found.
Deprecated. Lists buckets for the authenticated organization. Use GET /v2/buckets instead.