Appearance
Index Admin API
Observability and maintenance for the search engine (Meilisearch). These endpoints power the Admin → Index page and are intended for troubleshooting indexing. All routes require manage:all (Super Administrator) permission, and the API key of the search engine is never returned.
Get Overview
Returns instance-level information (host, version, health, database size), metadata for the emails index (document count, primary key, indexing state, field distribution), and per-ingestion-source document counts taken directly from the search index's facet distribution — not the database.
Search engine overview
GET
/v1/index-admin/overview
Returns Meilisearch instance info (host, version, health, database size) and the emails index metadata (document count, primary key, indexing state, field distribution). Read-only. Requires manage:all (Super Admin) permission.
Authorizations
bearerAuth
JWT obtained from POST /v1/auth/login. Pass as Authorization: Bearer <token>.
Type
HTTP (bearer)
or
apiKeyAuth
API key generated via POST /v1/api-keys. Pass as X-API-KEY: <key>.
Type
API Key (header: X-API-KEY)
Responses
Search engine overview.
Get Tasks
Returns a cursor-paginated list of Meilisearch tasks for the emails index (e.g. documentAdditionOrUpdate), including status, received/indexed document counts, duration, timestamps, and any error. Filter with statuses and types, and page with limit + from (use the next cursor from the previous response).
Search engine task list
GET
/v1/index-admin/tasks
Returns a cursor-paginated list of Meilisearch tasks for the emails index, optionally filtered by status/type. Read-only. Requires manage:all (Super Admin) permission.
Authorizations
bearerAuth
JWT obtained from POST /v1/auth/login. Pass as Authorization: Bearer <token>.
Type
HTTP (bearer)
or
apiKeyAuth
API key generated via POST /v1/api-keys. Pass as X-API-KEY: <key>.
Type
API Key (header: X-API-KEY)
Parameters
Query Parameters
limit
Type
integer
Default
20from
Cursor (task uid) to page from.
Type
integer
statuses
Comma-separated statuses (enqueued,processing,succeeded,failed,canceled).
Type
string
types
Comma-separated task types.
Type
string
Responses
Paginated task list.
Clean Up Orphaned Documents
Queues a background sweep that removes documents from the emails index whose archived email no longer exists in the database.
These entries are left behind when a deletion removes the database row but its search index counterpart never completes — for example if the search engine was unavailable at the time. They appear to users as search results that cannot be opened. The sweep clears whole blocks first, for ingestion sources that were deleted, then compares the remaining document ids against the database one page at a time.
No emails, attachments or stored files are touched: the database and the stored .eml files are the archive's source of truth, and the index is rebuilt from them by a reindex. The response reports the surplus of index documents over archived emails as estimatedOrphans, which is a floor rather than an exact figure — emails archived but not yet indexed offset orphans one for one. The exact number removed is written to the worker log and the job's result on Admin → Jobs.
Only one sweep runs at a time. A request made while one is already queued or running joins it instead of starting a second, and says so via alreadyRunning in the response. Once a sweep has finished, the action can be triggered again — including after a failed run.
Remove orphaned search index documents
POST
/v1/index-admin/orphans/cleanup
Queues a background sweep that deletes documents from the emails index whose archived email no longer exists in the database. These are left behind when a deletion removes the database row but its search index counterpart never completes, and they surface as search results that cannot be opened. No emails, attachments or stored files are touched. Requires manage:all (Super Admin) permission.
Authorizations
bearerAuth
JWT obtained from POST /v1/auth/login. Pass as Authorization: Bearer <token>.
Type
HTTP (bearer)
or
apiKeyAuth
API key generated via POST /v1/api-keys. Pass as X-API-KEY: <key>.
Type
API Key (header: X-API-KEY)
Responses
Cleanup job accepted and queued.
application/json
JSON "message": "string", "estimatedOrphans": 0, "workerAlive": true, "alreadyRunning": true
{
}
Verify Index Coverage
Queues a background job that checks every email marked as indexed against the emails index, and queues for indexing again those whose document is missing.
An email is marked as indexed only once the search engine confirms the write, but it can still end up marked without a document: the upgrade to v0.5.1 marked every existing email as indexed without asking the search engine, and a search index restored from an old dump, or one whose data was lost, leaves the same state. The automatic reconcile only looks at emails marked as not yet indexed, so it never finds these. The job reads the archive page by page in id order, asks the search engine which of those emails it holds, marks the missing ones as not indexed and queues them on the indexing queue.
Nothing is deleted: emails, attachments, stored files and existing index entries are left as they are. The lookup needs Meilisearch 1.14 or newer; on an older engine the job fails on its first page and says so. The numbers checked, reset and queued, with a breakdown per ingestion source, are written to the worker log and the job's result on Admin → Jobs.
Only one verification runs at a time. A request made while one is already queued or running joins it and says so via alreadyRunning. Running it again is safe: a second pass only finds what the first did not already queue.
Verify search index coverage
POST
/v1/index-admin/verify
Queues a background job that checks every email marked as indexed against the emails index and re-queues for indexing those whose document is missing. Such emails are otherwise never picked up again, because the self-healing reconcile only looks at emails marked as unindexed. Nothing is deleted. Requires Meilisearch 1.14 or newer and manage:all (Super Admin) permission.
Authorizations
bearerAuth
JWT obtained from POST /v1/auth/login. Pass as Authorization: Bearer <token>.
Type
HTTP (bearer)
or
apiKeyAuth
API key generated via POST /v1/api-keys. Pass as X-API-KEY: <key>.
Type
API Key (header: X-API-KEY)
Responses
Verification job accepted and queued.
application/json
JSON "message": "string", "workerAlive": true, "alreadyRunning": true
{
}