CLI & REST API

REST API

The HTTP API the MCP server and CLI are built on. Use it to integrate Willet with anything that speaks HTTP.

Interactive reference

The complete, always-current endpoint reference is the interactive API explorer in your dashboard. It renders the OpenAPI spec with every endpoint, parameter, and response schema, and lets you run live requests against your account using a short-lived token.

Base URL

On Willet Cloud, every endpoint lives under https://willet.bgenc.dev/api/v1. Self-hosted servers serve the same API under <your-server>/api/v1.

The raw OpenAPI 3.1 spec is served at /api/v1/openapi.json if you'd rather generate a client or import it into your own tooling.

Authentication

Send an API secret as a bearer token on every request: Authorization: Bearer <secret>.

curl -H "Authorization: Bearer $WILLET_API_TOKEN" \ https://willet.bgenc.dev/api/v1/me

On Willet Cloud, mint a secret in the dashboard under Settings → API secrets. Each secret has a scope and an access level:

  • user / project chooses all your projects, or just one.
  • read / read_write chooses read-only, or full read/write.

Errors

Errors return a non-2xx status and a JSON body: { "error": "message", "details": [...] }.

400Request validation failed.
401Missing, invalid, revoked, or expired secret.
403The secret lacks permission, e.g. a read-only or project-scoped secret used where it isn't allowed.
404The resource doesn't exist.
501A Cloud-only endpoint called on a self-hosted server.

Next

Prefer the terminal? The CLI wraps all of these endpoints with login, JSON output, and exit codes.

CLI reference