Browse this section
API reference

API introduction

Base URL, conventions, versioning and the resources available.

The BrewMy{Code} REST API gives you programmatic access to everything in the platform.

Base URL: https://api.brewmycode.com/v1

Conventions

  • JSON request and response bodies, Content-Type: application/json.
  • Resource ids are prefixed strings: kb_…, doc_…, qry_…, conv_…, agt_…, run_…, whk_….
  • Timestamps are ISO 8601 in UTC.
  • Money is expressed as { "amount": "1234.50", "currency": "EUR" }.
  • List endpoints return { "data": [...], "next_cursor": "..." }; see Pagination.
  • Errors return a JSON problem body; see Errors.

Resources

ResourcePurpose
Knowledge basesCreate and manage knowledge bases and sources
DocumentsUpload, list, read and delete documents
QueriesAsk questions and receive cited answers
ConversationsMulti-turn context
AgentsCreate, version, promote and trigger agents
RunsInspect runs, traces and approvals
WebhooksReceive events

Versioning

The API is versioned in the path (/v1). Backwards-compatible additions (new fields, new endpoints) happen without a version change. Breaking changes ship as a new version and are announced in the changelog at least 60 days in advance; previous versions are supported for 12 months after a new version is released.

Regions

Requests are served from the region of your workspace. EU workspaces use api.brewmycode.com; dedicated deployments receive their own hostname.

SDKs

Official SDKs: Python (pip install brewmycode) and TypeScript (npm install @brewmycode/sdk). A CLI, bmc, ships with the Python package.