Skip to main content
Nordvec Docs

Push documents from your own systems

Create a datasource, push documents into it with an indexing API key, choose who can read them, and pause or delete it when the source changes.

  • View as Markdown
  • View context pack

External assistants

These open a third-party AI service outside the EU. The link passes it this page's address, and anything you ask there is processed by that provider under its own terms.

The push API indexes documents from systems Nordvec has no connector for: an internal wiki export, a ticket archive, a database of notes. You send the text and who may read it; Nordvec stores it in the EU, indexes it, and makes it searchable and citable like any other document. Every pushed document lands in a datasource, a named container in your workspace that a workspace admin creates first. A push that names a datasource which does not exist, or one that is paused, is refused.

Create a datasource

Open your workspace's page, named after the workspace in the sidebar, then its Datasources section, and choose the Create datasource button. Workspace admins and owners can do this; in a personal workspace, that is you.

FieldNotes
NameWhat people see in the settings list. Up to 200 characters.
SlugWhat every push names. Lowercase letters, digits, - and _, starting with a letter or digit, up to 200 characters. It cannot be changed later.

The slug confluence-export is used in the examples below.

Create an indexing API key

Pushes authenticate with an API key of the Indexing (push API) class that carries the index:write scope; add index:status to track ingestion and index:delete to remove documents or replace a whole datasource. Create one with the Create key button on the API keys card in the Security section of your workspace's page; the raw key starts with nv_eu_idx_ and is shown once. See Authentication. Each request also names your workspace id as tenantId, the id in your workspace's address in the app (/w/<workspace id>/...), and it must be the workspace the key belongs to.

Push one document

/documents/push creates the document, or updates it when a document with the same id already exists in the datasource.

curl https://nordvec.com/api/v1/documents/push \
  -H "Authorization: Bearer $NORDVEC_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: page-4711-2026-09-28" \
  -d '{
    "tenantId": "YOUR_WORKSPACE_ID",
    "document": {
      "id": "page-4711",
      "title": "Travel expense policy",
      "datasource": "confluence-export",
      "body": { "mimeType": "text/markdown", "content": "# Travel expenses\n..." },
      "permissions": {},
      "sourceUrl": "https://wiki.example.com/pages/4711",
      "type": "policy"
    }
  }'
{ "documentId": "page-4711", "status": "queued", "updated": false }
  • id is your stable id for the document within the datasource. Pushing the same id again updates it; unchanged content is recognised by its hash and not indexed twice. A push that writes the document makes the user who created the API key its owner: a new document, changed content, a retry of a failed document, or a document restored from the trash. The owner reads the document whatever permissions says. permissions is required on every push and replaces the document's whole permission set, even when the content is unchanged.
  • body.mimeType is one of text/plain, text/markdown, text/html, application/pdf, or the Word, Excel and PowerPoint (.docx, .xlsx, .pptx) types. Binary content is sent base64-encoded.
  • sourceUrl becomes the "jump to source" link on every citation of the document. Omit it on a re-push to keep the stored one, or send null to clear it.
  • type sets the document's content_type, which search and list filter on.

The whole request body is capped at 1 MB, so a large file or a big batch answers 413; split it.

Choose who can read it

permissions is required on every push, so a sharing decision is never made by leaving a field out. In a datasource visible to the workspace:

permissionsWho can read the document
{}Every member of the workspace
{ "allowedUsers": ["ana@example.com"] }The people listed and the document's owner
{ "allowedGroups": ["GROUP_ID"] }Members of those workspace groups, including nested groups, and the document's owner
{ "allowAllTenantMembers": false }Refused: a document nobody can read is a delete

To change who can read a document without sending its content again, use POST /documents/push/permissions. Making an already-restricted document visible to the whole workspace additionally needs the index:acl-widen scope, on any push that sends {} as well, so a routine sync cannot quietly undo a restriction someone set by hand.

Push in batches

/documents/push/bulk takes up to 100 documents for one datasource per call. The answer counts accepted and rejected and gives a result per document, so one bad document does not fail the batch. The exception is a document the call may not make visible to the whole workspace: without index:acl-widen that refusal fails the whole call. Each document follows the owner and permissions rules of a single push. The 1 MB body cap applies per call, so split large uploads into several calls under the same uploadId.

curl https://nordvec.com/api/v1/documents/push/bulk \
  -H "Authorization: Bearer $NORDVEC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tenantId": "YOUR_WORKSPACE_ID",
    "uploadId": "nightly-2026-09-28",
    "datasource": "confluence-export",
    "documents": [
      { "id": "page-4711", "title": "Travel expense policy", "datasource": "confluence-export",
        "body": { "mimeType": "text/plain", "content": "..." }, "permissions": {} }
    ]
  }'

Replace a whole datasource

When your system can list everything a datasource should hold, send the full listing as one upload session, and the documents it no longer contains are moved to the trash when the session closes. Sessions need an indexing API key holding index:delete as well as index:write, because the close removes documents; the key that opens one is the only key that can continue it.

  1. Send the first page with "isFirstPage": true. It is page 0.
  2. Send every further page with its pageIndex (1, 2, ...), in any order. A page sent twice counts once, so a retry is always safe.
  3. Send the last page with "isLastPage": true and its pageIndex. A listing that fits in one page sends isFirstPage and isLastPage together. The last page may carry no documents.

Every page uses the same uploadId, and each answer carries the session's progress under upload. The session closes only when every page from 0 to the last has arrived. Closing it moves to the trash each document in the datasource that no page of the session named and that existed before the session opened. Any other push to the datasource while the session runs keeps the document it names: a single push, a batch without session fields, a permissions update, and a re-push of unchanged content alike. The trash keeps what the close moved there for 30 days; pushing a document again brings it back, and so does restoring the whole session (see below).

A session that receives no page for 24 hours expires and closes without removing anything. A refused page is answered with 409 Conflict, writes nothing, and its data.reason says why:

reasonWhat to do
upload_incompleteSend the pages listed in missingPageIndexes, then the last page again
deletion_confirmation_requiredThe close would trash more than 20% of the datasource. If that is right, send the last page again with "confirmDeletions" set to wouldTombstone
deletion_confirmation_too_largeconfirmDeletions is larger than the number of documents the datasource held when the session opened. Send the count you expect to remove
upload_in_progressA session is open on this datasource. If it is your key's, finish it, wait for it to expire, or start over with "forceRestartUpload": true on your first page. If another key opened it, forceRestartUpload replaces it only once it has received no page for an hour, from the time in restartableAt
upload_expired, upload_missing, upload_restartedThe session is gone; start a new one with a new uploadId
upload_closed, upload_id_reusedThe uploadId is spent; use a new one
page_index_requiredYour key has a session open on this datasource; send pageIndex with the page

To resume after a crash, read the session with GET /documents/push/upload?tenantId=...&datasource=...&uploadId=... (scope index:status). Its missingPageIndexes lists the pages still to send.

Undo a session's close

If a session removed documents it should not have, for example because the listing it sent was cut short, restore them in one call:

curl https://nordvec.com/api/v1/documents/push/upload/restore \
  -H "Authorization: Bearer $NORDVEC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "tenantId": "YOUR_WORKSPACE_ID", "datasource": "confluence-export", "uploadId": "nightly-2026-09-28" }'

The key that opened the session can restore it, and so can a workspace admin signed in to Nordvec, for a session opened by any key. Every document the close moved to the trash comes back with the content it had, and the answer counts them: restored are live again, purged had already been deleted for good by the trash, and skipped had changed since the close (pushed again, or removed again) and were left as they are. Restoring a session twice answers with the first restore's counts and "replayed": true, and queues any restored document still waiting to be indexed, so repeating a restore that failed to answer is safe. A session can be restored for 35 days after it closed, and for as long as the trash still holds any document it removed. A refused restore is answered with 409 Conflict and its data.reason:

reasonWhat it means
upload_not_closedThe session never closed, so it removed nothing
upload_in_progressA session is open on the datasource. Restore once it has closed or expired
restore_purgedMore than 30 days have passed, and the trash has deleted every one of the documents. Push them again
corpus_cap_exceededBringing the documents back would pass the workspace's document limit, so none came back. data.wouldRestore is how many it needs and data.headroom how many fit. Free room, then restore again
corpus_storage_exceededBringing the documents back would pass the workspace's storage allowance, so none came back. data.wouldRestore is how many it would bring back. Free storage by deleting documents, or move the workspace to a plan with a higher document limit, then restore again
corpus_text_exceededBringing the documents back would pass the workspace's allowance for searchable text, so none came back. data.wouldRestore is how many it would bring back. Delete large documents, or move the workspace to a plan with a higher document limit, then restore again

Track ingestion

A push answers as soon as the document is queued. Ask for its progress with GET /documents/push/status (scope index:status), filtered by datasource or document id. A document moves from queued through processing to completed, or to failed with an error.

When a push is refused

A push that names an unknown or paused datasource is answered with 422 Unprocessable Content. The message names the slug and links to the Datasources section of your workspace's page, and the error's data says why and what to do:

{
  "defined": true,
  "code": "UNPROCESSABLE_CONTENT",
  "status": 422,
  "message": "Datasource \"confluence-export\" is paused and accepts no documents. A workspace admin resumes it in the workspace's Datasources section: https://nordvec.com/w/YOUR_WORKSPACE_ID/workspace/datasources",
  "data": {
    "why": "The datasource \"confluence-export\" is paused",
    "fix": "Resume it at https://nordvec.com/w/YOUR_WORKSPACE_ID/workspace/datasources, then retry the push",
    "link": "https://nordvec.com/docs/guides/how-to/push-documents"
  }
}

Do not retry these automatically: they succeed only after an admin creates or resumes the datasource.

A workspace whose subscription has lapsed, or that is suspended, stops growing. A push that writes a document is answered with 403 Forbidden and the code NOT_ENTITLED: new or changed content, a retry of a failed document, and a push that brings a document back from the trash. A bulk push that contains any such document is refused whole, and an upload-session page with one is not recorded, so a last page does not close the session or remove anything. Change access meanwhile with POST /documents/push/permissions. Re-pushing unchanged content of a live document still succeeds. A restore that would bring documents back is refused the same way, and its data carries why, fix and link as above; repeating a restore that already succeeded still answers with its first counts. Reading and exporting the workspace's documents stay open, so you can still take your data out. Retry once the subscription is renewed, or once support lifts a suspension.

Remove a document

POST /documents/push/delete (scope index:delete) removes a pushed document by its datasource and id. Documents you stop pushing are not removed on their own: delete each one you retire, or send the datasource's full listing as an upload session, described above.

Pause, resume and delete

  • The Pause action refuses every further push into the datasource. Its documents stay searchable. A push already being written when you pause completes.
  • The Resume action accepts pushes again.
  • The Delete action removes the datasource and every document pushed to it, with their search index. Your own system keeps its copy, so pushing again after you recreate the datasource restores them. A delete cannot be undone.

If another admin changed the datasource after your list loaded, the action is refused and the list reloads, so you decide again against what is there now. Every create, pause, resume and delete is recorded in the workspace audit log.

The settings list shows who each datasource is visible to. Who can read a pushed document is decided by the permissions sent with it; creating, pausing or deleting a datasource never widens access to anything.

Push writes are idempotent: repeat the same Idempotency-Key on every retry of one write, and a duplicate is answered from the first attempt instead of being applied twice. See Errors and rate limits.

Next steps

Was this page helpful?

On this page