---
title: "Initiate GCS upload for chat attachment"
method: POST
path: "/api/chat/attachments/upload/initiate"
tags: ["chat"]
---

# Initiate GCS upload for chat attachment

`POST /api/chat/attachments/upload/initiate`

## Request

- Base URL: `https://localhost:8080`
- URL: `https://localhost:8080/api/chat/attachments/upload/initiate`
- Auth: none declared

## Request body

- InitiateGcsUploadDto
  - `conversationId` string: Conversation ID to associate after send (optional; often unset until first message)
  - `fileName` string, required
  - `fileSize` number, required
  - `mimeType` string, required
  - `fileType` 'image' | 'pdf' | 'document', required

## Response `200`

Signed URL issued

## Other responses

- `401`: Sign-in required (guests not allowed)
- `503`: GCS not configured

---

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