---
title: "Request a presigned URL for uploading an attachment"
method: POST
path: "/v1/attachments/uploads"
tags: ["attachments"]
---

# Request a presigned URL for uploading an attachment

`POST /v1/attachments/uploads`

## Request body

- object
  - `filename` string, required
  - `mimeType` string, required
  - `fileSize` integer, required
  - `type` 'image' | 'video' | 'file' | 'audio' | 'gif' | 'sticker', required
  - `width` integer
  - `height` integer
  - `blurHash` string
  - `duration` integer

## Response `200`

Successful response

- object
  - `attachmentId` string, uuid, required
  - `uploadUrl` string, uri, required
  - `s3Key` string, required
  - `url` string, uri, required

## Other responses

- `404` — Resource not found

---

[API](https://skmtc.net/legend/apis/legend-api.md) · [All operations](https://skmtc.net/legend/apis/legend-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/legend/legend-api/versions/34b8f4885f8a/schema)
