Skip to main content
Docs

Assistant

The assistant drafts a mandate from a contract or quote, summarises a release for the person approving it, and explains risk flags. It never approves, overrides or releases anything. It is off by default for each tenant, and its routes answer 503 ai_unavailable when it is not configured. Some routes answer 422 feature_not_available at launch.

The base is https://holdyn-fb2e34c7cbae.herokuapp.com/api/v1/b2b. Every endpoint below lists who may call it.

At a glance#

Objects

Assistant: AiArtifact, MandateDraftResult, AiStatus (drafting and summaries are P1, stubbed at launch)

Assistant: AiArtifact, MandateDraftResult, AiStatus (drafting and summaries are P1, stubbed at launch) (example values)
{
  "id": "aiart_6543a1b2c3d4e5f6a7b8cff0",
  "object": "ai_artifact",
  "livemode": false,
  "kind": "approver_summary",
  "label": "Analysis — advice to the approver, not a decision",
  "mandate": "man_6543a1b2c3d4e5f6a7b8cc00",
  "release": "rel_6543a1b2c3d4e5f6a7b8cd50",
  "model": "claude-opus-5-5",
  "prompt_version": "summary.v1",
  "status": "ok",
  "output": { "text": "…", "highlights": [ { "kind": "warning", "text": "Bank details changed 2 days ago." } ] },
  "output_hash": "…64 hex",
  "created_by": "mem_6543a1b2c3d4e5f6a7b8c9d3",
  "record": { "chain": "test", "seq": 320, "hash": "…" },
  "created_at": "2026-12-22T10:06:00.000Z"
}

Endpoints

GET/ai/status

Credential
Member session
Permission
tenant.read
Mode
scoped

POST/ai/mandate-draftsNot available yet

This route answers 422 feature_not_available until it ships.

Credential
Member session
Permission
ai.use
Mode
scoped
Idempotency
honoured

Request

JSON {"text": "<contract or quote text, ≤ 100,000 chars>", "template": "tpl_…"?} or multipart/form-data with ONE file (PDF or DOCX ≤ 10 MB) and optional template.

Errors

503 ai_unavailable (+ reason); 429 ai_budget_exceeded; 422 ai_refused, feature_not_available; upload errors.

Record and events

ai.draft_generated (model, prompt version, input digest, output hash) or ai.request_refused.

Notes

asynchronous because a long contract exceeds the request timer; documents are framed as untrusted input; one strict tool call (propose_mandate_draft); output validated by the mandate validator.

GET/ai/artifacts

Credential
Member session
Permission
ai.use
Mode
scoped
Pagination
cursor

Request

kind, mandate, release. · Response: 200 ListResponse<AiArtifact>.

GET/ai/artifacts/:id

Credential
Member session
Permission
ai.use
Mode
scoped
Assistant · Holdyn Business docs