Skip to main content
All paths are under the base URL (/api/v1) and require authentication. The broker is gated: off by default in production, with a separate external-lane rollout and per-principal grants (see Broker). Reads need broker:read; invoke needs broker:invoke or work:write; grants and criterion need broker:admin. Setup (connect/disconnect) is not here; it lives under integrations.

Availability

When the broker is disabled the whole surface returns 503. When the external lane is closed or no grant matches, an external caller’s reads return an empty result rather than an error. Internal callers (an owned API key or dashboard session) are governed by identity and scopes; a faceless OAuth caller additionally needs rollout on and a matching grant.

Discover and read

Invoke and materialize

invoke executes inline (there is no approval queue). For a write effect, pass idempotency_key for safe replay; writes are never auto-retried. index and index/preview are OAuth-mapped to broker:admin (or broad work:write): indexing curates what the whole workspace can retrieve and cite — the same class of act as attaching criterion — so it never rides broker:invoke, and the service layer still grant-gates external principals on the underlying record reads. The write preview route stays deliberately unmapped (OAuth-denied) until the governed-write contract ships. The context read returns {provider, connection, criterion, context: [{slug, title, what, trust, stale, missing?}], next_action} and is audited as a read receipt (broker.context.read) — the call an agent makes before working a connection. The generic documents/:externalId/content read supersedes the Notion-only connections/notion/pages/:pageId/content route (kept as a deprecated alias). Both accept an optional ?connection= selector — forward-compatible for multi-account; today each provider has one connection, so omit it.

Grants

Grants gate the external lane only; managing them is owner/admin.

Errors

The controller is rate limited per principal; invoke, preview, and page-content are throttled tighter, and index / import tighter still. Errors map to stable codes: RATE_LIMITED, INVALID_VALUE (fix the request), and a transient INTERNAL for upstream 5xx. See errors for the envelope.