CortexDB Docs
API Reference

/v1/import

Bulk-ingest memories — generic JSONL plus typed importers for mem0, zep, letta, and OpenAI.

POST
/v1/import
AuthorizationBearer <token>

PASETO v4 public token (or deployment gate key). Auth-disabled dev instances accept any caller.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/v1/import" \  -H "Content-Type: application/json" \  -d '{}'
Empty
POST
/v1/import/jsonl
AuthorizationBearer <token>

PASETO v4 public token (or deployment gate key). Auth-disabled dev instances accept any caller.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/v1/import/jsonl" \  -H "Content-Type: application/json" \  -d '{    "scope_template": "string",    "lines": [      "string"    ]  }'
Empty
POST
/v1/import/mem0
AuthorizationBearer <token>

PASETO v4 public token (or deployment gate key). Auth-disabled dev instances accept any caller.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/v1/import/mem0" \  -H "Content-Type: application/json" \  -d '{    "scope_template": "string",    "rows": [      {        "memory": "string"      }    ]  }'
Empty
POST
/v1/import/zep
AuthorizationBearer <token>

PASETO v4 public token (or deployment gate key). Auth-disabled dev instances accept any caller.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/v1/import/zep" \  -H "Content-Type: application/json" \  -d '{    "scope_template": "string",    "rows": [      {}    ]  }'
Empty
POST
/v1/import/letta
AuthorizationBearer <token>

PASETO v4 public token (or deployment gate key). Auth-disabled dev instances accept any caller.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/v1/import/letta" \  -H "Content-Type: application/json" \  -d '{    "scope": "string",    "rows": [      {}    ]  }'
Empty
POST
/v1/import/openai
AuthorizationBearer <token>

PASETO v4 public token (or deployment gate key). Auth-disabled dev instances accept any caller.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/v1/import/openai" \  -H "Content-Type: application/json" \  -d '{    "scope": "string",    "rows": [      {        "text": "string"      }    ]  }'
Empty
GET
/v1/import/{id}
AuthorizationBearer <token>

PASETO v4 public token (or deployment gate key). Auth-disabled dev instances accept any caller.

In: header

Path Parameters

id*string

Response Body

curl -X GET "https://example.com/v1/import/string"
Empty

Importers

ImporterRow shape
jsonlA full experience envelope including its own scope (see below).
mem0{ user_id, memory, timestamp, metadata } — scope filled from scope_template.
zep{ user_id, fact, valid_from, valid_to } → a triple.
letta{ text, kind, created_at } (body { scope, rows }) → a document. The older { block_label, value, limit } shape imports nothing (accepted: 0, "content.message text is empty").
openairows need text (not content).

Each jsonl line carries its own scope

For the generic jsonl importer, every line must include its own scope; scope_template applies to the typed importers (mem0 / zep fill org:demo/user:{user_id}), not to jsonl. A line without a scope is counted as failed rather than failing the request: the import returns 202 with failed: 1 and first_error: "line 0: missing field scope". Lines with unknown fields (such as a template variable) are rejected the same way.

The openai importer wants text, not content

openai rows use text — { id, content, created_at } → 422 "rows[0]: missing field text".

Response shapes

  • POST → 202 { import_id, status, accepted, failed, status_url } (+ first_error on failures). For small imports status is completed immediately (it runs synchronously), not running.
  • GET /v1/import/{id} → { import_id, source, status, processed, total, failed, errors[{ line, error }] }. The count field is processed (not imported); there is no elapsed_ms / lifecycle_stream. status ∈ running / completed / failed / cancelled. Per-row errors[].error reporting is genuinely useful for debugging a bad file. Stability: beta.

On this page