Create Index

Beta
Create an empty index. Name it, and optionally give field types. Fields left out are typed from the first records added. Then add records to it.

Authentication

AuthorizationBearer

A write key, issued by Captain. Server side only. Sent as Authorization: Bearer <key>.

Request

This endpoint expects an object.
namestringRequiredformat: "^[a-z0-9][a-z0-9_-]{0,47}$"

lowercase letters, digits, - and _, up to 48 characters

id_fieldstringOptionalDefaults to id
the field that holds each record's unique id
fieldsmap from strings to objectsOptional
optional field types. A field left out is typed from the first records added.

Response

Created
capabilitiesobjectOptional

what an index supports, derived from its settings and served config (field names only: no values, counts or totals). version is bumped on any breaking change; refuse a version you do not know. tenant_field, build and limits come only with an admin key

namestringOptional
aliasstringOptional
id_fieldstringOptional
statusenumOptional

empty: no records yet. pending: changes were accepted and are being applied. building: Captain is refreshing suggestions and spelling in the background, and search serves as usual. ready: every change is applied.

Allowed values:
schema_sourceenumOptional
Allowed values:
record_countintegerOptional
Records the index holds, built or not.
pending_changesbooleanOptional
True while accepted changes are still being applied.
last_build_atinteger or nullOptional

unix seconds the serving build finished; null when nothing is served, or for a build whose finish time was not recorded

build_idstring or nullOptional
last_jobstring or nullOptional
last_errorstring or nullOptional
created_atintegerOptional
nounobjectOptional

what the index holds: settings.noun, else the index name when it reads as a plural noun, else record / records

servingobject or nullOptional
The build search is serving, and how many records it holds.
© 2026 Captain