One API, one contract
The API is the pipe — the structured record and workflow engine are the product.
REST + JSON
Versioned from day one (/v1/…). Reads delegate to the same store the UI uses — no parallel logic.
Scoped API keys
Bearer tokens (mr_sk_…) returned once and stored only as a hash. Scope per org, per capability.
Signed webhooks
Outbox-first delivery with retry/backoff, HMAC-SHA256 signatures, and a self-serve delivery log.
🧭OpenAPI spec
Contract-first: live spec at /openapi.json, Swagger at /docs.
API reference
The /v1 surface. Full details and examples live in the docs.
| Method | Path | Description | Scope |
|---|---|---|---|
| GET | /v1/state | Full filing state for the key's org | records:read |
| GET | /v1/documents | List documents (filterable) | records:read |
| GET | /v1/documents/{id} | Fetch one document by MatterRef number | records:read |
| GET | /v1/clients | List clients | records:read |
| GET | /v1/matters | List matters | records:read |
| GET | /v1/sets | List sets | records:read |
| POST | /v1/documents | Issue a document (file into the repository) | records:write |
| PATCH | /v1/documents/{id} | Update mutable fields | records:write |
| POST | /v1/clients · /v1/matters · /v1/sets | Create filing structure | records:write |
| POST | /v1/inbound · /v1/inbound/file | Capture and file inbound records | records:write |
| POST | /v1/workflows/{id}/run | Start a workflow run | workflows:trigger |
| POST | /v1/webhooks | Register an outbound webhook | webhooks:manage |
| POST | /v1/webhooks/{id}/test | Send a live test event | webhooks:manage |
Scopes
Each key is granted a subset of capabilities. A key can never mint or revoke keys.
| Scope | Grants |
|---|---|
records:read | Read state, documents, clients, matters, sets |
records:write | Create/update records, file inbound captures |
workflows:trigger | Start a workflow run |
webhooks:manage | Manage webhook endpoints, view deliveries, send tests |