Connections
object_store and file_service — move documents in and out of a workspaceProviders
openai, anthropic, ollama — back AI-driven detectionConnections
A connection holds a provider, its credentials, and — for object stores — a sync schedule. ItsconnectionType is its capability category:
Creating an Object-Store Connection
displayName, a typed config, and optionally isActive
and a sync schedule. The provider tag inside the config selects the
variant, and thereby which credential shape is required.
Credentials are encrypted at rest and never returned in API responses. A
connection response carries only metadata —
provider, connectionType,
isActive, lastSyncedAt, and the sync schedule when one is configured.Connecting a Cloud File Service
File services are OAuth-backed, so there are no credentials to supply. Start the flow, send the user to the returnedauthorizeUrl, and the connection is
created when the provider redirects back:
Verifying a Connection
Check reachability before relying on a connection:reachable and, on failure, an error.
Syncing Documents
How a connection transfers depends on its type.Object Stores
An object store is enumerable, so it syncs the whole listing — on a schedule or on demand:A
sync schedule is accepted only for schedulable providers — object stores.
It is rejected for a file service, which transfers on demand.File Services
A file service is not enumerated on a timer. Import is picker-driven: the user picks files in the provider’s own picker, and you pass the selection through. Export writes each redacted output as a new provider file, never overwriting the source.getPickerToken mints a short-lived one from the
connection’s stored credentials; the refresh token is never returned.
Sync Status
A sync record reportsstatus, triggerType, recordsSynced, attempt,
startedAt, and errorMessage on failure.
triggerType is scheduled when the connection’s own schedule started it, or
on_demand for everything else — a user, the SDK, or an external automation.
Cancel a running sync with:
Providers
Inference providers are a separate resource. A provider is an LLM or NER service the platform calls; itsproviderType is llm or ner.
ollama carries no secret — it is addressed by a caller-supplied baseUrl,
which is the self-hosted option. openai and anthropic accept an optional
baseUrl for gateways and compatible endpoints.verifyProvider.
Webhooks
Register endpoints to receive events as documents, detections, reviews, and syncs progress:events it should receive — among them
document.created, connection.sync.completed, connection.sync.failed,
provider.updated, review.opened, and review.verified. Creating one
returns its signing secret once; use the test endpoint to confirm delivery
before depending on it.
Managing Connections
provider filter, and workspace-wide
syncs also accept status.
Set isActive: false to pause a connection or a provider without deleting it —
scheduled syncs stop, and the configuration is retained.
Next Steps
API Reference
Connection, provider, and sync endpoints
TypeScript SDK
connections, providers, syncs, and webhooks