---
title: "POST /to-do/{task_id}/attachments"
method: POST
path: "/to-do/{task_id}/attachments"
tags: ["task-attachments"]
---

# POST /to-do/{task_id}/attachments

`POST /to-do/{task_id}/attachments`

## Request

- Base URL: `https://api.focusbear.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.focusbear.io/to-do/{task_id}/attachments`
- Auth: HTTP bearer

## Path parameters

- `task_id` string, uuid, required

## Request body

- CreateTaskAttachmentDto
  - `file_name` string, required: Original file name
  - `file_key` string, required: R2 storage key for the file
  - `content_type` string, required: MIME type of the file
  - `file_size` number, required: File size in bytes

## Response `201`

- TaskAttachmentResponseDto
  - `id` string, required
  - `task_id` string, required
  - `user_id` string, required
  - `file_name` string, required
  - `file_key` string, required
  - `content_type` string, required
  - `file_size` number, required
  - `download_url` string
  - `user` TaskCommentUserDto
    - `id` string, required
    - `username` string
  - `created_at` string, required
  - `updated_at` string, required

---

[API](https://skmtc.dev/focusbear/apis/focusbear-api.md) - [All operations](https://skmtc.dev/focusbear/apis/focusbear-api/llms.txt) - [OpenAPI document](https://skmtc.dev/focusbear/apis/focusbear-api/revisions/3a83a3b9a811?raw)
