---
title: "Get a presigned URL for direct S3 upload"
method: POST
path: "/storage/presign"
tags: ["storage"]
---

# Get a presigned URL for direct S3 upload

`POST /storage/presign`

Returns a presigned URL that allows direct file upload to S3. The client should PUT the file directly to the returned uploadUrl.

## Request body

- PresignUploadDto
  - `contentType` string, required — The MIME type of the file
  - `size` number, required — The file size in bytes (max 10MB)

## Response `201`

Presigned URL generated successfully

- PresignUploadResponseDto
  - `uploadUrl` string, required — The presigned URL to PUT the file directly to S3
  - `attachmentUri` string, required — The attachment URI to reference this file in messages
  - `expiresIn` number, required — Time in seconds until the presigned URL expires

## Other responses

- `400` — Invalid request (missing contentType or size, or size exceeds 10MB)
- `503` — Storage is not configured

---

[API](https://skmtc.net/tambo-ai/apis/tambo-api.md) · [All operations](https://skmtc.net/tambo-ai/apis/tambo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tambo-ai/tambo-api/revisions/312691b28f1c/schema)
