Uploads

Uploads let you request a pre-signed S3 URL to upload a file for a given purpose (e.g. Evidence), then reference the resulting object key when creating the associated resource.

Request Upload URL

Generate a pre-signed S3 URL to upload a file for the given purpose. PUT the file directly to presignedUrl with a Content-Type header matching the contentType sent in this request (or the auto-derived type if omitted), then use the returned objectKey per the semantics of that purpose.

🔒 Requires Evidence Library: Create Evidence permission.

Securitybearer
Request
Request Body schema: application/json
required
purpose
required
string

What the uploaded file will be attached to. Determines authorization, storage prefix, and workspace requirements.

Value: "evidence"
workspaceId
number

Required when purpose is workspace-scoped (currently: evidence). Omit for account-global purposes.

fileName
required
string

The original filename of the file that will be uploaded. Used to build the S3 object key returned in the response.

contentType
string

The MIME type of the file being uploaded. Sent back as the Content-Type on the pre-signed URL, so the client's PUT must send a matching Content-Type header. If omitted, it's best-effort derived from the filename's extension, falling back to application/octet-stream.

Responses
201

Created

400

Malformed data and/or validation errors

401

Invalid Authorization

403

You are not allowed to perform this action

412

You must accept the Drata terms and conditions to use the API

500

Internal server error

post/upload-urls
Request samples
application/json
{
  • "purpose": "evidence",
  • "workspaceId": 11,
  • "fileName": "My Security Training.pdf",
  • "contentType": "application/pdf"
}
Response samples
application/json
{}