Skip to content
Open Breno

API overview

The Breno REST API at a glance: base path, the response envelope, the seventeen operations a personal token can call, idempotency, and where the contract lives.

The public API lets your own scripts and tools take knowledge out of Breno and put it back in, with the same access rules as the app. Anything it does, a person could do in the product, as the token's owner and no more.

Base#

All paths are under /api/v1 on your Breno host.

Base URL
https://<your-breno-host>/api/v1

Requests and responses are JSON, except file uploads (multipart/form-data), export archives (application/zip) and the streamed answer (text/event-stream).

The response envelope#

A successful JSON response wraps its payload:

Success
{ "success": true, "data": { } }

An error uses a single envelope. See Errors.

Error
{ "success": false, "error": { "code": "INSUFFICIENT_SCOPE", "message": "…", "details": { } } }

The seventeen operations#

A personal token can call exactly these. Every other endpoint refuses tokens with 403 SESSION_REQUIRED.

ScopeOperationRoute
readList itemsGET /documents
readList items as cardsGET /documents/cards
readGet an itemGET /documents/{id}
readFull extracted textGET /documents/{id}/text
readA note's contentGET /documents/{id}/content
readSearch passagesPOST /search/query
readList native connectorsGET /connectors
readList connected sourcesGET /integrations/connections
askAsk, with citationsPOST /search/ask
askAsk, streamedGET /search/ask/stream
exportJSON bundlePOST /knowledge/export
exportZIP archive (up to 500 items)POST /knowledge/export/zip
exportStart an asynchronous exportPOST /knowledge/exports
exportDownload a finished exportGET /knowledge/exports/{id}/download
writeUpload a filePOST /documents/upload
writeCapture a linkPOST /documents/capture
writeEdit one of your own notesPATCH /documents/{id}/content

Idempotency#

POST /documents/upload and POST /documents/capture accept an Idempotency-Key header. A repeated request with the same key replays the stored response instead of doing the work twice, so it is safe to retry after a network failure.

The contract#

The full contract is the OpenAPI document, served at /api/v1/openapi.json. A test fails if the token allowlist, the router and the spec's public operations disagree, or if a public schema's fields differ from what the server writes. See Authentication to get started.