Application API reference

The LegalPrizm application uses an internal API to authenticate sessions, organize matters, receive documents and record changes.

How it works

  • One origin. The API enforces same-origin browser requests and rejects cross-site writes.
  • A session cookie. Sign-in sets an HttpOnly cookie. For accounts with a second factor, the server verifies the code before authenticating the session.
  • Permissions on every operation. Each operation declares the capability it needs. The server checks that capability before authorizing the operation.
  • Errors in one shape. Errors follow RFC 9457 and include a stable code and a request ID.
  • Limits. The per-address limit is 1,000 requests per minute, with a tighter limit of 10 per minute for sign-in. Sign-in also has a per-account limit of 25 requests per 15 minutes.
  • Lists are paged. A page carries an opaque cursor to the next.

Routes

Routes are grouped by the records they manage.

Sign-in and account

  • POST /api/auth/sign-up creates a firm and its administrator
  • POST /api/auth/sign-in
  • POST /api/auth/mfa/verify the second step
  • POST /api/auth/sign-out
  • GET /api/auth/sessions
  • DELETE /api/auth/sessions/:id
  • POST /api/auth/sign-out-everywhere
  • GET /api/auth/mfa
  • POST /api/auth/mfa/enroll
  • POST /api/auth/mfa/confirm
  • POST /api/auth/mfa/disable
  • POST /api/auth/password/forgot
  • POST /api/auth/password/reset
  • POST /api/auth/email/verify
  • POST /api/auth/email/verification
  • GET /api/auth/session who is signed in on this request

Matters

  • POST /api/matters
  • GET /api/matters
  • GET /api/matters/:matterId
  • PATCH /api/matters/:matterId
  • POST /api/matters/:matterId/archive
  • POST /api/matters/:matterId/restore
  • GET /api/matters/:matterId/members
  • POST /api/matters/:matterId/members
  • PATCH /api/matters/:matterId/members/:userId
  • DELETE /api/matters/:matterId/members/:userId
  • GET /api/matters/:matterId/custodians
  • POST /api/matters/:matterId/custodians
  • PATCH /api/matters/:matterId/custodians/:custodianId
  • DELETE /api/matters/:matterId/custodians/:custodianId

Documents

  • POST /api/matters/:matterId/documents the file is the request body
  • GET /api/matters/:matterId/documents
  • GET /api/matters/:matterId/documents/:documentId
  • GET /api/matters/:matterId/documents/:documentId/download

The record

  • GET /api/audit/chain is the log intact, and does it pass through its latest anchor
  • GET /api/audit/anchors
  • GET /api/audit/events

Health

  • GET /api/health
  • GET /api/health/ready

Receiving a file

Send the document bytes as the request body. The server computes its fingerprints as the bytes arrive.

POST /api/matters/<matterId>/documents Content-Type: application/pdf X-LegalPrizm-Filename: deposition.pdf X-LegalPrizm-Sha256: <optional: the digest the sender expects> <the file's bytes>

Use custodianId in the query to specify the source. Omitting it selects the matter’s default custodian. Before storing the file, the server validates its size, type and any digest supplied with the request.

Creating a matter

POST /api/matters Content-Type: application/json { "name": "Smith v. Jones" }

Discuss an integration

Tell us which systems your firm uses and the information you need to move between them.

Contact us