跳到主要内容

Import a bank (async)

POST 

/v1/default/banks/:bank_id/transfer/import

Submit a transfer archive (produced by the export endpoint) for import. Runs as a background operation: facts are re-embedded with the target bank's embedding model and entities are re-resolved — no LLM extraction, so the import costs no tokens and invents no new facts.

Two modes. restore (default) writes a whole bank into target_bank_id, which must NOT already exist — it restores a bank rather than merging into one, and is how a bank is moved between instances or copied under a new id. merge folds an archive's documents into this bank, with document_conflict deciding what happens to ids that already exist (skip, replace, new-id).

The include flags narrow what is restored to a subset of what the archive holds; they cannot add what the producer did not export. Returns an operation_id; poll GET /v1/default/banks/{bank_id}/operations/{operation_id} for status and per-component counts. The operation is recorded against {bank_id} even in restore mode, because the target bank does not exist yet.

Authentication required — include an Authorization: Bearer hsk_... header. See Authentication for details.

Request

Responses

Successful Response