Glozr docs

API reference

Sources ingest API

The Sources ingest API lets you push knowledge into a Glozr workspace over HTTP — from a wiki, a CMS, a data pipeline or a one-off CSV import. Anything you'd otherwise add through the admin UI can be added programmatically here.

Authentication

Generate a workspace API token from Settings → API tokens with the sources:write ability:

Authorization: Bearer pbar_…48-character-token…

Tokens are workspace-scoped and individually revocable. Revocation invalidates the token immediately but leaves historical records intact.

Endpoints

  • List sources: GET /api/v1/workspace/sources — returns up to 100 of the most recent sources.
  • Create a source: POST /api/v1/workspace/sources — see the three supported kinds below.
  • Fetch one source: GET /api/v1/workspace/sources/{id} — useful for polling the indexing state.

Source kinds

The create endpoint accepts three kinds:

  1. URL. Crawl a single URL.
  2. Sitemap. Crawl a sitemap, which fans out to every URL inside it.
  3. Text. Push raw text content. Bypasses the crawler entirely — bulletproof for pages behind authentication or for content that doesn't live on the web at all.

Successful creates return 201 Created with status: "pending". The source transitions to indexed once chunks land in the vector store — typically 10–60 seconds depending on size.

Error handling

  • 401 — missing or invalid token.
  • 403 — token is missing the sources:write ability.
  • 404 — referenced agent does not exist in the workspace.
  • 422 — validation error (bad URL, empty text, unsupported kind).

Rate limits

120 requests/minute per token. Exceeding returns 429 with a Retry-After header indicating when the bucket will refill.

Processing pipeline

Source creation enqueues crawler and indexer jobs. Content is fetched (or read directly, for the text kind), chunked, embedded, and upserted to the vector store so it can be cited in agent responses.

Note. Don't poll /sources/{id} in a tight loop. The pipeline typically takes 10–60 seconds; once a minute is plenty.