Skip to main content

POST /api/ingest-export

Ingests a conversation data export (JSON) for a given connection. The export file is normalized into individual conversations with a consistent { role, content, timestamp } message format and stored in the Verso database. Currently supports ChatGPT export format (DAG → linear message list normalization).

Request

Headers Body

Processing

The endpoint performs a diff/upsert for each conversation:
  1. Normalize — raw export data is converted to NormalizedConversation (linear message list)
  2. Check existing — looks up by (connection_id, external_id)
  3. Insert — if no existing record
  4. Update — if existing record has an older update_time
  5. Skip — if existing record is the same or newer
After processing, the connection’s last_ok_at is updated. If any conversations were inserted or updated, a data.imported webhook is enqueued.

Response

Errors