Skip to content

Create file upload URLs

Request

Create file records in a case and return a presigned S3 PUT URL for each. Upload each file's bytes to its putUrl with an HTTP PUT, then report the upload with PATCH /api/v1/cases/{caseUuid}/files/{fileUuid}.

Every upload PUT must include:

  • x-amz-server-side-encryption: AES256
  • Content-Type set to the file's media type:
ExtensionContent-Type
.pdfapplication/pdf
.jpg, .jpegimage/jpeg
.pngimage/png
.tif, .tiffimage/tiff
.gifimage/gif
.docapplication/msword
.docxapplication/vnd.openxmlformats-officedocument.wordprocessingml.document

For example:

curl -X PUT "$PUT_URL" \
  -H "x-amz-server-side-encryption: AES256" \
  -H "Content-Type: image/jpeg" \
  --upload-file x-ray.jpg
Security
oauth2ClientCredentials(Required scopes: files:write) and apiKeyAuth
Path
caseUuidstring, (uuid)required

Case UUID.

Bodyapplication/jsonrequired
fileNamesArray of strings, [ 1 .. 100 ] items, uniquerequired

Unique file names to upload (1 to 100). Supported extensions: .pdf, .jpg, .jpeg, .png, .tif, .tiff, .gif, .doc, .docx.

Example:
[ "medical-record.pdf", "x-ray.png" ]
prioritystring

SLA priority for the files, from P0 (highest) to P4 (lowest). When omitted, your workspace's default priority applies. Wisedocs counts each file's pages after upload; if they are past the priority's page limit, the file is moved to the next lower priority that fits, and its due date follows that priority.

Enum:"P0""P1""P2""P3""P4"
Example:"P1"
curl -i -X POST \
  'https://docs.wisedocs.ai/_mock/api/openapi/api/v1/cases/{caseUuid}/files' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -d '{
    "fileNames": [
      "medical-record.pdf"
    ]
  }'

Responses

File records and their presigned upload URLs created.

Bodyapplication/json
dataobjectrequired
statusstringrequired
Example:"success"
Response
{ "data": { "fileData": [ … ] }, "status": "success" }