Skip to navigation

Refresh a knowledge source

Creates a new ingestion revision. Existing immutable retrieval snapshots stay unchanged. A revision or state change to a source in an agent library changes that agent’s publication ETag. Reingest keeps ownership; it never makes an agent-owned source usable by another agent. A destination that is not a permitted public address is reported later as state=failed with failure=outbound_destination_refused, not as a request error.

Authentication

AuthorizationBearer

Create and manage workspace-owned keys through the existing app session routes, outside this public API. Creator and manager identities are audit actors only. Key validity follows workspace policy, expiry and explicit revocation, independently of creator membership. Do not include a workspace-selection header.

Path parameters

source_idstringRequired1-128 characters
Resource identity within the authenticated workspace.

Headers

If-MatchstringRequired

Strong ETag from the resource being changed. Draft/tool/variable/publication operations use the complete agent draft ETag; number operations use the number ETag; MCP update uses its own ETag. Never retry a stale edit by blindly using a fresh ETag. Agent identity edits use the identity ETag; knowledge-source reingest uses the source ETag. A stale revision returns 409: draft_conflict for agent, draft, variable, tool, MCP server and publication-token checks; conflict with details.reason=stale_revision for phone numbers and knowledge sources. A missing header returns 428 revision_required. Same-intent replay uses the original If-Match and returns its receipt before checking current revision.

Idempotency-KeystringRequired1-255 characters

Stable key per logical intent, 1–255 printable characters. Persist it before sending. Retry the same key/body after an uncertain result for 24 hours. A changed body conflicts. Beyond retention, reconcile the resource before retrying; this is not permanent deduplication. Current authorization is rechecked on replay. Evaluation order: authenticate and check current authorization; look up intent; replay its stored receipt before checking the current revision; only a new intent evaluates If-Match and executes. Fingerprint includes method, path, body and original If-Match. A changed request returns idempotency_key_reused. The server stores only a keyed (HMAC) fingerprint, and no error or response ever returns a fingerprint or hash of a request. In-flight intent returns 409 idempotency_in_progress with Retry-After; retry the same intent after reconciliation. Receipts describe that attempt, not current resource state. A replay returns the original status code and body, with the response header Idempotent-Replayed: true.

Response headers

X-Request-IdstringOptional
Safe server request correlation ID.
RateLimit-LimitintegerOptional
Requests allowed in the current window for the tightest applicable limit.
RateLimit-RemainingintegerOptional
Requests left in the current window.
RateLimit-ResetintegerOptional
Seconds until the current window resets.
Idempotent-ReplayedstringOptional

true when this response replays a stored Idempotency-Key result. The status and body equal the original.

LocationstringOptional<=2048 characters

Path-absolute URL of the resource to poll, including the API base path. Agent-scoped knowledge creates point to the canonical knowledge source URL.

Response

Refresh a knowledge source.
idstring<=128 characters
Opaque kb identifier. Do not parse its contents.
namestring
kindstring

Open response vocabulary. Preserve unknown values; never assume they mean success.

statestring

pending and ingesting are in progress: keep polling. Settled states: ready (retrieval-ready), fallback (text could not be indexed but can be frozen as bounded prompt context when the source is in an agent library), failed (read failure), archived (hidden from new library selection; retained published evidence keeps working). Open response vocabulary. Preserve unknown values; never assume they mean success.

revisionstring
created_atdatetime
failurestring or null
Safe registered reason.
content_sha256string or null
content_bytesinteger or null>=0
media_typestring or null
ingested_atdatetime or null
updated_atdatetime
ownerobject
resource_keystring or nullformat: "^[A-Za-z0-9][A-Za-z0-9._:~-]{0,127}$"1-128 characters

Optional caller-chosen resource key: an opaque external identifier that matches your own record (for example a CRM ID, a configuration-file ID or a UUID) to this resource. Rasen still generates the canonical id; use id in paths and references. Case-sensitive, compared exactly, never normalized or parsed. 1-128 characters from A-Z a-z 0-9 . _ : ~ - and starting with a letter or digit; UUIDs and ULIDs are valid. Unique per resource type within one workspace; separate environment workspaces can reuse the same key. Set only at creation and immutable afterwards. A create with a key that already exists returns 409 resource_key_conflict with details.existing_id; it never updates or returns the existing resource. Not an Idempotency-Key: that header identifies one request intent for 24 hours, and a same-intent replay returns its original receipt before the resource-key check runs. Uniqueness includes archived resources. A key becomes free again only after its resource is permanently deleted or erased (a deleted secret or a deleted knowledge source); archive never frees it.

poll_after_secondsinteger or null>=1
Seconds to wait before the next read while state is pending or ingesting. Null when the state is settled.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
428
Precondition Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error