---
title: "Create Attachment"
method: POST
path: "/workspaces/{workspace_id}/cases/{case_id}/attachments"
tags: ["case-attachments"]
---

# Create Attachment

`POST /workspaces/{workspace_id}/cases/{case_id}/attachments`

## Request

- Base URL: `https://platform.tracecat.com/api`
- URL: `https://platform.tracecat.com/api/workspaces/{workspace_id}/cases/{case_id}/attachments`
- Auth: one of:
  - API key in cookie `fastapiusersauth`
  - HTTP bearer

Upload a new attachment to a case.

## Path parameters

- `case_id` string, uuid, required
- `workspace_id` string, uuid, required

## Request body `multipart/form-data`

- BodyCaseAttachmentsCreateAttachment
  - `file` string, binary, required

## Response `201`

Successful Response

- CaseAttachmentRead: Model for reading a case attachment.
  - `id` string, uuid, required
  - `case_id` string, uuid, required
  - `file_id` string, uuid, required
  - `file_name` string, required
  - `content_type` string, required
  - `size` integer, required
  - `sha256` string, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `creator_id` string, uuid, nullable
  - `is_deleted` boolean

## Other responses

- `422`: Validation Error

---

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