Modbot Docs
APIAPI referenceEvidence

Finish the upload

POST/api/evidence/uploads/{uploadId}/commit

Phase 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.

AuthorizationBearer <token>

An API key, made on Settings, API keys. Every key starts with mbk_.

In: header

Path Parameters

uploadId*string

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"}

Modbot is not endorsed by or affiliated with VRChat Inc. or Discord Inc. VRChat is a trademark of VRChat Inc. Discord is a trademark of Discord Inc. SteamVR is a trademark of Valve Corporation. Windows is a trademark of Microsoft Corporation. Docker is a trademark of Docker, Inc. PostgreSQL is a trademark of the PostgreSQL Community Association of Canada. Railway is a trademark of Railway Corp. Other names are trademarks of their respective owners; see Legal. Modbot and its logo are trademarks of the Modbot project. Open source under AGPL-3.0.