---
title: "Stage a task attachment"
method: POST
path: "/task/draft-upload/{projectId}"
tags: ["Tasks"]
---

# Stage a task attachment

`POST /task/draft-upload/{projectId}`

## Request

- Base URL: `https://cloud.kaneo.app/api`
- URL: `https://cloud.kaneo.app/api/task/draft-upload/{projectId}`
- Auth: HTTP bearer

Upload an attachment before submitting a task. Staged assets are private to the uploader and expire after 24 hours.

## Path parameters

- `projectId` string, required

## Request body

- object
  - `filename` string, required
  - `contentType` string, required
  - `size` number, required
  - `surface` 'description', required

## Response `200`

Presigned upload

- TaskImageUpload
  - `key` string, required: Object key to send back to the finalize route.
  - `uploadUrl` string, required: Presigned URL to PUT the image bytes to.
  - `headers` object, required: Headers that must accompany the upload request, including Content-Type.

## Other responses

- `400`: Invalid upload
- `401`: Missing or invalid credentials
- `403`: Missing task:create permission
- `404`: Project not found
- `429`: The API key exceeded its rate limit or usage quota. Wait the number of seconds in Retry-After before retrying. The X-RateLimit headers are sent only when the rate limit was hit.
- `503`: Storage unavailable

## Changes

- **2026-10-08** `c7b8a842601b`: 5 breaking, 6 info
  - removed the media type `text/plain` for the response with the status `400`
  - removed the media type `text/plain` for the response with the status `403`
  - removed the media type `text/plain` for the response with the status `404`
  - removed the media type `text/plain` for the response with the status `429`
  - …7 more
- **2026-10-08** `2ed51b8af657`: 5 breaking, 5 info
  - removed the media type `application/json` for the response with the status `400`
  - removed the media type `application/json` for the response with the status `401`
  - removed the media type `application/json` for the response with the status `403`
  - removed the media type `application/json` for the response with the status `404`
  - …6 more
- **2026-10-07** `df1439c724ee`: 4 breaking, 5 info
  - removed the media type `text/plain` for the response with the status `400`
  - removed the media type `text/plain` for the response with the status `403`
  - removed the media type `text/plain` for the response with the status `404`
  - removed the media type `text/plain` for the response with the status `503`
  - …5 more
- **2026-09-30** `f9a06a9a16c4`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/usekaneo/apis/kaneo-api/changes/task/draft-upload/:projectId/post.md)

---

[API](https://skmtc.dev/usekaneo/apis/kaneo-api.md) - [All operations](https://skmtc.dev/usekaneo/apis/kaneo-api/llms.txt) - [OpenAPI document](https://skmtc.dev/usekaneo/apis/kaneo-api/revisions/93f78789100c?raw)
