Developer overview

One API at /v1 serves every Amanucci client, the web app, the am CLI and the MCP server alike, and every capability is reachable headless.

Amanucci has one backend and one contract. Every client, including Amanucci's own web app, reaches the product only through the HTTP API under /v1. There is no private route for the web app and no shortcut for the command line.

 browser          terminal            AI agent
 web app          am CLI              MCP server (am mcp)
     \               |                  /
      \              |                 /
       HTTPS  ──▶  https://api.amanucci.com/v1
                     credential · rate limit · hat · step-up
                     ▼
                   the operation

Headless first

Every capability is an API operation before it has a screen. If the web app can do it, a script can do it with curl. The few operations deliberately kept out of the CLI and MCP (signing in, verifying a one-time code, the operator console) are named with their reason in the task catalog.

The doors

ClientCredentialWhat it renders
Web app (app.amanucci.com)session cookiescreens
am CLIAPI key or sessionthe task catalog as commands
MCP serverAPI keythe task catalog as tools

Every client passes through the same request stack: the same authentication, the same rate limits, the same checks on who may do what, and the same error format.

The contract

  • Base URL: https://api.amanucci.com/v1.
  • OpenAPI: the full contract is published at /v1/openapi.json. The API reference in this documentation is generated from it.
  • JSON: keys are camelCase. Dates are ISO 8601 ("2026-03-14").
  • Money is always a decimal string beside its currency, such as "121.00", never a JSON number. Never round or recompute it.
  • Resources are scoped by entity. A legal entity (one company's books) is the unit of access: /v1/entities/{entityId}/documents.
  • Acts are transitions, not field updates: POST …/finalize, POST …/lock, POST …/confirm.
  • Lists paginate by cursor. ?limit= (at most 200) and ?cursor=; a page is { "items": [...], "nextCursor": ... }. A limit above 200 is refused with 422, never silently reduced.
  • Retries are safe. A create carries an id you mint (a UUID v7); sending it again returns the existing row rather than a duplicate. There is no Idempotency-Key header.
  • Additive within /v1. Fields are added, not removed or retyped.

What a key can never do

Signed acts, such as submitting a filing or posting an entry by hand, need a person's session with a fresh one-time code. An API key, and therefore any agent, can prepare that work but cannot perform the act. See Authentication.