Skip to content

Backfill history

Upload an export, so a score has history behind it from the first day.

Send us the conversations you already have. This is a file upload, not a JSON body.

The request

bash

curl -X POST "https://app.evidova.com/ingest/v1/import" \
  -H "authorization: Bearer ak_live_..." \
  -F "file=@export.jsonl" \
  -F "adapter=generic"

The form fields

fileRequired. The export itself. One JSON document, or one JSON record per line
adapterRequired. Which contract to read the file with. Use generic for a file you built yourself
client_idOptional. Which client the history belongs to
agent_idOptional. Which agent the history belongs to. It says the client too

A key limited to one client may name only that client. A key with no limit may name any client of the workspace.

Whose history it is

Name nothing when nothing leaves a doubt. A conversation filed under no agent is never scored, so where there is a doubt we refuse the file with a 422 that says what to name.

One client in the workspaceThe file is that client's
One agent for the client, or one generic connection that names its agentThe file is that agent's
Several clients, and none namedRefused. Name client_id or agent_id
Several agents, and nothing says whichRefused. Name agent_id; the message lists the agents

How it differs from sending events

  • The file is stored first and read by a background job, so the answer comes back before any of it is parsed.
  • The ceiling is 200 MiB per file, against 8 MiB for a live batch.
  • A line we cannot read is skipped and counted, so one bad record does not cost you the export. A file where no line parses fails outright, because that is the wrong file rather than a partial one.

What we send back

json

{ "status": "accepted", "import_id": "...", "job_id": "...", "object_key": "..." }

The import shows in the app from then on, on the Conversations screen and on the page for bringing in old conversations, with how many it has brought in so far.

202Stored and queued.
401The key is missing, revoked, or does not carry the ingest scope.
403The key is limited to a client other than the one named.
404The client or agent named is not one of this workspace's.
413The file is above 200 MiB. Split it.
422A form field is missing or not an id, or we cannot tell whose history it is. The message says what to name.

Read next

  • Connections · What a connection carries, why an API key cannot create one, and the two settings that decide whether it gets scored.
  • Event payload reference · The event shape to send: required fields, accepted fields, and what happens to the rest.
  • Conversations · List conversations, and open one with its turns, findings and scores.
This page as markdown