---
title: "Upload Attachment"
method: POST
path: "/api/v1/projects/{project_id}/attachments"
tags: ["attachments"]
---

# Upload Attachment

`POST /api/v1/projects/{project_id}/attachments`

## Request

- Base URL: `https://api.rebolt.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.rebolt.ai/api/v1/projects/{project_id}/attachments`
- Auth: HTTP bearer

## Path parameters

- `project_id` string, uuid, required: The unique identifier of the project

## Request body `multipart/form-data`

- BodyUploadAttachmentApiV1ProjectsProjectIdAttachmentsPost
  - `file` string, binary, required

## Response `201`

Successful Response

- LLMAttachmentOutput: Extra media content attached to a LLM message.
  - `attachment_id` string, uuid, required
  - `file_name` string, required
  - `content_type` union, required
    - 'image/jpeg' | 'image/jpg' | 'image/png' | 'image/gif' | 'image/webp' | 'image/tiff' | 'image/bmp' | 'image/heic' | 'image/heif' | 'image/svg+xml' | 'image/avif': An enum of mime types for images.
    - 'audio/mpeg' | 'audio/wav' | 'audio/ogg' | 'audio/m4a' | 'audio/aac' | 'audio/flac' | 'audio/webm': An enum of mime types for audio.
    - 'video/mp4' | 'video/quicktime' | 'video/x-msvideo' | 'video/mpeg' | 'video/webm' | 'video/x-matroska' | 'video/x-ms-wmv': An enum of mime types for video.
    - 'text/plain' | 'text/csv' | 'application/json' | 'application/xml' | 'text/html' | 'text/yaml' | 'text/markdown' | 'text/toml' | 'text/ini' | 'text/calendar': An enum of mime types for text.
    - 'application/pdf' | 'application/rtf' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' | 'application/msword' | 'application/vnd.ms-word.document.macroEnabled.12' | 'application/vnd.oasis.opendocument.text' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' | 'application/vnd.ms-excel' | 'application/vnd.ms-excel.sheet.binary.macroenabled.12' | 'application/vnd.ms-excel.sheet.macroenabled.12' | 'application/vnd.oasis.opendocument.spreadsheet' | 'application/vnd.openxmlformats-officedocument.presentationml.presentation' | 'application/vnd.ms-powerpoint' | 'application/vnd.ms-powerpoint.presentation.macroEnabled.12' | 'application/vnd.openxmlformats-officedocument.presentationml.slideshow' | 'application/vnd.ms-powerpoint.slideshow.macroenabled.12' | 'application/vnd.visio' | 'application/vnd.ms-project' | 'application/vnd.google-apps.document' | 'application/vnd.google-apps.spreadsheet' | 'application/vnd.google-apps.presentation' | 'application/vnd.google-apps.drawing': An enum of mime types for documents.
    - 'application/zip' | 'application/x-rar-compressed' | 'application/x-tar' | 'application/gzip' | 'application/x-bzip2' | 'application/x-7z-compressed' | 'application/x-xz' | 'application/zstd' | 'application/x-lzma' | 'application/x-lz4' | 'application/x-cpio' | 'application/vnd.ms-cab-compressed' | 'application/x-iso9660-image' | 'application/java-archive' | 'application/octet-stream': An enum of mime types for archives.
    - 'message/rfc822' | 'application/vnd.ms-outlook': An enum of mime types for email.
  - `content_category` 'image' | 'audio' | 'video' | 'text' | 'document' | 'archive' | 'email', required: The category of a content type.

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-14** `6e68f3c2611b`: 1 breaking, 3 info
  - the `file` request property contentMediaType changed from `` to `application/octet-stream`
  - the `file` request property format was generalized from `binary` to no format
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status

[Operation history](https://skmtc.dev/rebolt/apis/rebolt-api/changes/api/v1/projects/:project_id/attachments/post.md)

---

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