LensHub
Get startedlenshub.ai
Connectors

Pushing your own documents

Making any internal system searchable, without a built-in connector.

If a system has no connector, you can push documents to LensHub over HTTP. A short script is usually enough.

Set it up

  1. Connectors → Add connector, type Custom push. Name it after the system it represents.
  2. Note the connector's ID from its page.
  3. Create an API key with write access.

Push documents

curl -X POST https://lenshub.example.com/api/ingest/SOURCE_ID/documents \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "documents": [
      {
        "external_ref": "runbook-042",
        "name": "Restarting the batch processor",
        "description": "What to do when the nightly job wedges",
        "body": "# Restarting the batch processor\n\nFull text here...",
        "tags": ["runbook", "operations"]
      }
    ]
  }'

The fields

FieldRequiredNotes
external_refyesYour stable identifier. Pushing the same ref again updates rather than duplicates
nameyesTitle, as it appears in results
bodyyesThe content. Markdown renders nicely
descriptionnoOne line of context
tagsnoStrings
archivednotrue removes it from search

Updating and removing

Updating: push the same external_ref with new content. A new version is written only if the content actually changed, so re-pushing everything nightly is cheap and safe.

Removing: push the same external_ref with "archived": true. It stops appearing in search and remains recoverable.

Limits

Up to 100 documents and 5 MB per request. Split larger batches.

The request returns immediately and processing continues in the background — documents become searchable shortly after.

A pattern that works

Run a script on a schedule that pushes everything, using stable external_refs. Unchanged documents cost nothing, changed ones update, and you never have to track what you sent last time.

On this page