---
title: "Upload a chat session file attachment"
method: POST
path: "/uploads/chat/sessions/{session_id}/files"
tags: ["Uploads"]
---

# Upload a chat session file attachment

`POST /uploads/chat/sessions/{session_id}/files`

## Request

- Base URL: `https://api-docs.jackhamr.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api-docs.jackhamr.ai/uploads/chat/sessions/{session_id}/files`
- Auth: none declared

Upload a file attachment scoped to a chat session.

Mirrors the internal ``POST /api/chat/files/upload`` path: same
``UPLOAD_DIR``, same MIME allow-list, same 50 MB cap, same
``ChatFile`` row shape, same ``FileUploadResponse`` contract. The
session's agent must belong to the caller's org; a cross-org
session surfaces as 404 so existence is not leaked across org
boundaries.

## Path parameters

- `session_id` string, required

## Response `201`

Successful Response

- FileUploadResponse: Response for ``POST /api/v1/chat/sessions/{id}/files``. Mirrors the internal chat-files upload contract: the stored file id, original name, size, MIME type, and a relative download URL.
  - `id` string, required
  - `name` string, required
  - `size` integer, required
  - `mime_type` string, required
  - `url` string, required
  - `uploaded_at` string, required

## Other responses

- `422`: Validation Error

---

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