Records and governance API

Keep the record. Show what happened to it.

Archive workspaces, retention and disposal, holds, record fields and the controls around outside sharing. Every change is an act with an actor, a reason and an audit event.

Organisation routes need an administrator. A Partner application needs scope organisation. Record field reads, previews and camera details need a file read scope only.

Availability

These are contract features. Casewelt switches them on for your organisation by arrangement and your administrators manage them from there. Ask the API which ones are on before you call their routes.

GET /v1/features
Authorization: Bearer …

{
  "deep_archive": true,
  "metadata_schema": true,
  "media_previews": false,
  "sharing_approval": true
}

While a feature is off its routes answer 403 entitlement_required and existing routes keep their old answers. Administrators read and change the settings of the features that are on with /v1/organisations/contract-features.

Archive workspaces

PathWhat it is for
GET/v1/organisations/deep-archiveWorkspaces, whether they qualify, their archive mode and any area hold.
PUT/v1/organisations/deep-archiveMake a governed workspace an archive, or turn an empty one back.
POST/v1/organisations/deep-archivePlace or release an area hold on the whole workspace.

PUT Make a workspace an archive

/v1/organisations/deep-archive

{
  "workspace_id": "…",
  "archive_mode": "DEEP_ARCHIVE"
}

From then on nobody renames, moves, deletes or replaces a file there. Every write answers 409 deep_archive_immutable, through the API, the portal, the editor and file requests alike. Workspaces that desktops or phones sync into cannot become archives.

Retention and disposal

PathWhat it is for
/v1/organisations/retention/classesRetention classes: a period in months, counted from upload or from an event date, or kept indefinitely.
/v1/organisations/retention/workspacesA default class per archive workspace, and the record field whose value picks the class.
PUT/v1/organisations/retention/categoriesMap one value of that field to a class.
/v1/organisations/retention/assignmentsEvery record with its class and due date. Set a class or an event date by hand.
POST/v1/organisations/retention/disposeDispose of records whose retention has ended, with a note.

POST Dispose of due records

/v1/organisations/retention/dispose

{
  "file_ids": ["…", "…"],
  "note": "Review 2026-Q4, approved by records officer"
}
{
  "disposed": 1,
  "method": "logical",
  "results": [
    { "file_id": "…", "outcome": "disposed", "class": "contracts_7y", "due_on": "2026-10-31", "content_sha256": "…" },
    { "file_id": "…", "outcome": "refused", "code": "file_on_hold" }
  ]
}

Each file answers for itself. A hold always wins, a record that is not due is refused, and the digest of what was disposed stays in the record. Administrators receive a daily review digest of records coming due.

Archive transfer

Finished work moves from a working workspace into an archive workspace on a schedule. A rule names the record field and value that mark a file complete, the days to wait, and what happens to the working copy. Files that are not complete never move.

PathWhat it is for
PUT/v1/organisations/archive-transferSet the rule of a working workspace. Read it back with its weekly counts.
/v1/organisations/archive-transfer/itemsThe transfer record. Approve, cancel or retry an item.
POST/v1/organisations/archive-transfer/requestsTransfer files or a folder now.

PUT Set a transfer rule

/v1/organisations/archive-transfer

{
  "source_workspace_id": "…",
  "target_workspace_id": "…",
  "completion_field": "case_status",
  "completion_value": "Closed",
  "after_days": 30,
  "source_action": "TRASH",
  "direct_approval_required": true
}
{
  "state": "TRANSFERRED",
  "file_name": "Incident 114 report.pdf",
  "content_sha256": "…",
  "source_action_applied": "TRASHED",
  "finished_at": "2026-12-03T02:10:44Z"
}

The archive copy is written, read back and matched to the recorded SHA-256 before the working copy is released. It keeps the folder path, record fields, tags and original creation time. Files under hold or locked wait. A direct transfer can require a second administrator, and nobody approves their own request.

Holds

PathWhat it is for
POST/v1/organisations/holdsHold one file, with a reason. Add a matter, an owner and a review date.
GET/v1/organisations/holdsActive holds with their details.
PUT/v1/organisations/holdsChange the details, or release the hold.
POST/v1/organisations/deep-archiveHold a whole archive workspace at once.
POST /v1/organisations/holds
{
  "file_id": "…",
  "reason": "Litigation notice received",
  "matter": "M-2026-118",
  "owner_email": "legal@example.org",
  "review_on": "2027-03-01"
}

On the review date the owner and the administrators receive one reminder. Release is its own recorded act.

Record fields

PathWhat it is for
/v1/organisations/metadata-fieldsDefine typed fields for the organisation or one workspace: text, number, date, yes or no, or a list of choices.
GET/v1/metadata/schemaThe fields that apply in a workspace.
GET/v1/metadata/filesFiles with their values, filtered by field and paged by cursor.
GET/v1/metadata/facetsCounts per value for choice and yes or no fields.
GET/v1/metadata/incompleteFiles that miss a required field.
GET/v1/metadata/exportEvery value of a workspace as CSV or JSON.
GET /v1/metadata/files?workspace_id=…&f.record_type=contract&limit=200

Values are set with the existing file action metadata. A value of the wrong type answers 400 metadata_invalid_value, a missing required one 400 metadata_required, and the problem names the field.

Sharing controls

PathWhat it is for
GET/v1/organisations/share-approvalsOutside shares by members that wait for an administrator.
POST/v1/organisations/share-approvalsApprove or deny one, with a note.
PUT/v1/organisations/share-policyOne switch for outside sharing across the organisation.
POST /v1/shares   →   201
{ "share_id": "…", "approval": "pending", … }

POST /v1/organisations/share-approvals
{ "share_id": "…", "decision": "approve", "note": "Client counsel, matter M-2026-118" }

With approval on, a member's share is created held and nothing is sent. Approval releases it at the time the member asked for. With the organisation switch off, every outside share and guest invitation answers 403 external_share_disabled_org, whatever a workspace allows.

Image previews

PathWhat it is for
GET/v1/workspaces/{ws}/files/{id}/thumbnailA JPEG preview of the current version, 256 or 1024 pixels.
GET/v1/workspaces/{ws}/files/{id}/exifCamera details. Location is shown to administrators only.

Exit export

PathWhat it is for
POST/v1/organisations/exit-exportsAsk for a full copy of your content in storage you own.
GET/v1/organisations/exit-exportsProgress, file and byte counts, and the manifest digest.
POST/v1/organisations/exit-exports/{id}/cancelStop an export that has not finished.
{
  "endpoint": "https://s3.example.org",
  "region": "eu-west-2",
  "bucket": "records-exit",
  "prefix": "casewelt/",
  "access_key_id": "…",
  "secret_access_key": "…"
}

Casewelt writes a BagIt package to your bucket and records its manifest digest. Each request is approved by Casewelt before it runs, one export runs at a time, and your credentials are never returned.

Alerts and sign-ins

Security alerts e-mail your administrators when malware is blocked and when storage reaches a threshold you choose. Sign-ins and failed sign-ins of your members arrive in your own audit. Both are configured with PUT /v1/organisations/contract-features and read with GET /v1/audit/events.

PUT /v1/organisations/contract-features
{ "setting": "security_alerts.capacity_percent", "value": 85 }

GET /v1/audit/events?event_action=auth.login_failed&since=2026-11-01T00:00:00Z

Event names

AreaAudit events
Archive and retentionworkspace.archive_mode.set workspace.hold.place workspace.hold.release retention.class.created retention.class.applied retention.class.disposed retention.review.notified
Archive transferarchive.transfer.rule.set archive.transfer.requested archive.transfer.approved archive.transfer.completed archive.transfer.failed archive.transfer.report.sent
Holdsfile.hold.place file.hold.details file.hold.release file.hold.review_due
Record fieldsmetadata.field.created metadata.field.updated metadata.field.retired metadata.exported
Sharingshare.approval.requested share.approval.approved share.approval.denied org.share_policy.external_sharing
Exit exportorg.exit_export.requested org.exit_export.cancelled exit_export.started exit_export.done exit_export.failed
Alerts and sign-inssecurity.alert.malware security.alert.capacity auth.login auth.login_failed

Every route, field and problem code is in the endpoint reference and in the OpenAPI file.

When you try it

  1. Make a test workspace an archive, then try to rename a file in it through the API. Read works. Change answers 409.
  2. Create a class, map a field value to it, and watch the due date appear on the record.
  3. Hold one record, dispose of two, and read the two outcomes.
  4. Find the hold, the disposal and the refusal as separate events in the audit.

Bring a retention schedule

Map one category to one class and run it through the API.

We switch the features on for an evaluation organisation and walk through review, hold and disposal with your client.

Request a demo