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

# Finalize a staged task attachment

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

## Request

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

## Path parameters

- `projectId` string, required

## Request body

- object
  - `key` string, required: The key returned when the URL was issued.
  - `filename` string, required
  - `contentType` string, required
  - `size` number, required
  - `surface` 'description', required

## Response `200`

Staged attachment

- TaskImageAsset
  - `id` string, required
  - `url` string, required: Where the stored image can be read back from.

## Other responses

- `400`: Invalid upload
- `401`: Missing or invalid credentials
- `403`: Missing task:create permission
- `404`: Project not found
- `409`: Upload already attached
- `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`: 6 breaking, 7 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 `409`
  - …9 more
- **2026-10-08** `2ed51b8af657`: 6 breaking, 6 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`
  - …8 more
- **2026-10-07** `df1439c724ee`: 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 `409`
  - …7 more
- **2026-09-30** `f9a06a9a16c4`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/usekaneo/apis/kaneo-api/changes/task/draft-upload/:projectId/finalize/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)
