Start an upload
/api/evidence/uploadsPhase 1: reserve an upload and find out where the bytes go. Returns the cap in force, the accepted formats so the client can filter before a byte moves, and a target. On a store that can be written to directly the target is a presigned PUT straight to the bucket; otherwise it is Modbot's own transfer endpoint. That is a capability difference, not a failure.
Needs the UploadEvidence permission.
An API key, made on Settings, API keys. Every key starts with mbk_.
In: header
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
curl -X POST "https://example.com/api/evidence/uploads" \ -H "Content-Type: application/json" \ -d '{}'{ "uploadId": "string", "maxBytes": 0, "acceptedTypes": [ "string" ], "transferUrl": "string", "presigned": true}Take evidence off a case file POST
Ends this case file's hold on the file and keeps a line saying it was there. The bytes stay, and so does every other case file's hold on them; putting the file back is attaching it again. For the author of the case file or anyone who may ban, while it is not withdrawn (409 once it is). Recorded as a fact against your account. 404 when the file is not on this case file. Needs the `UploadEvidence` permission.
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.