---
title: "Generate presigned URL for attachment upload"
method: POST
path: "/cards/{cardPublicId}/attachments/upload-url"
tags: ["Attachments"]
---

# Generate presigned URL for attachment upload

`POST /cards/{cardPublicId}/attachments/upload-url`

Generates a presigned URL for uploading an attachment to S3

## Path parameters

- `cardPublicId` string, required

## Request body

- object
  - `filename` string, required
  - `contentType` string, required
  - `size` number, required

## Response `200`

Successful response

- object
  - `url` string, required
  - `key` string, required

## Other responses

- `400` — Invalid input data
- `401` — Authorization not provided
- `403` — Insufficient access
- `500` — Internal server error

---

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