Skip to main content
POST

Authorizations

Authorization
string
header
required

JWT token from Clerk authentication.

Must be from a user with org:admin role.

Body

application/json
filename
string
required

The name of the file being uploaded

Example:

"report.pdf"

contentType
string
required

The MIME type of the file

Example:

"application/pdf"

Response

Presigned URL generated successfully

url
string<uri>
required

The presigned URL to upload the file to

Example:

"https://account-id.r2.cloudflarestorage.com/bucket/..."

method
enum<string>
required

The HTTP method to use (always PUT)

Available options:
PUT
Example:

"PUT"

fileId
string<uuid>
required

Unique identifier for the uploaded file

Example:

"550e8400-e29b-41d4-a716-446655440000"

key
string
required

The storage key/path where the file will be stored

Example:

"org_xxx/uploads/550e8400-e29b-41d4-a716-446655440000/report.pdf"

contentKey
string
required

The storage key for extracted text content (for documents)

Example:

"org_xxx/contents/550e8400-e29b-41d4-a716-446655440000.md"

metadata
object
required

Values that MUST be included as headers when uploading to the presigned URL