Finish the upload
/api/evidence/uploads/{uploadId}/commitPhase 3: hash it, decide what it is, and attach it. Modbot reads the staged bytes back, hashes them, decides the content type from the bytes themselves — never from the filename and never from what the client claimed — checks the size that was actually stored against the per-file limit and the per-case-file and whole-install totals, promotes the object to its content-addressed key, writes the metadata and puts the file on the case file. SVG and HTML are refused outright. Idempotent on the upload id. reportId names the case file to attach to when the upload was begun without one, so a file can be sent before its case file is written; naming a different case file from the one the upload was begun for is refused with 409. The case file must exist (404), must not be withdrawn (409), and must be the caller's own or the caller must be allowed to ban (403); with no case file at all the commit is refused with 400. clipId names a saved clip from the case file's clips list: the file must hash to what that moderator's companion reported when the clip was saved (409 when it does not, 404 when there is no such clip), and is then kept as captured, with where and when it was saved. Recorded as a fact against your account.
Needs the UploadEvidence permission.
An API key, made on Settings, API keys. Every key starts with mbk_.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/api/evidence/uploads/string/commit" \ -H "Content-Type: application/json" \ -d '{}'{ "hash": "string", "byteSize": 0, "contentType": "string"}Send the bytes PUT
Phase 2: send the bytes, as a raw body. The body is the file and nothing else — no form encoding. The cap is enforced against bytes actually seen rather than against Content-Length, because Content-Length is a claim and a chunked body makes none. Retrying the same upload id overwrites its staging object rather than accumulating a second one. Needs the `UploadEvidence` permission.
List evidence GET
What is on a case file, or on any case file. Answered entirely from the database, so listing evidence costs the store no request and no egress. Destroyed items are listed too, because a case file that looks like it never had evidence is indistinguishable from one nobody ever documented. A file taken off a case file is left out unless includeTakenOff is true. One file on two case files is listed once for each. Returns at most 500 items, newest first. Needs the `ViewEvidence` permission.