---
title: "Add S3 object"
method: POST
path: "/chrt_gpt/conversations/s3_objects/add/v1/{conversation_id}"
tags: ["/chrt_gpt"]
---

# Add S3 object

`POST /chrt_gpt/conversations/s3_objects/add/v1/{conversation_id}`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/chrt_gpt/conversations/s3_objects/add/v1/{conversation_id}`
- Auth: HTTP bearer

Uploads an image, PDF, document, presentation, spreadsheet, or audio file into one of the caller's ChrtGPT conversations, creating it if needed, once it passes a malware scan, and adds the file's description to the conversation for ChrtGPT's next reply. | authz: allowed_org_types=[shipper, provider], min_org_role=operator | (UploadFile) -> (ChrtGPTConversationS3ObjectMetadata1)

## Path parameters

- `conversation_id` string, required

## Request body `multipart/form-data`

- BodyPostChrtGptConversationsS3ObjectsAddV1
  - `file` string, binary, required

## Response `200`

Successful Response

- ChrtGPTConversationS3ObjectMetadata1
  - `schema_version` 1, required
  - `_id` string, required
  - `conversation_id` string, required
  - `uploaded_at_timestamp` string, date-time, required
  - `uploaded_by_user_id` string, required: Must be a string starting with `user_`
  - `uploaded_by_org_id` string, required: Must be a string starting with `org_`
  - `s3_key_prefix` 'chrt_gpt/conversation_s3_object_metadata'
  - `object_type` 'image' | 'pdf' | 'document' | 'presentation' | 'spreadsheet' | 'audio', required
  - `content_type` string, required: MIME type detected from the file's bytes.
  - `filename` string, nullable: Original filename of the uploaded file
  - `size_bytes` integer, required
  - `blurhash` string, nullable
  - `ai_generated_description` string, required

## Other responses

- `403`: Access denied by authorization.
- `404`: File missing from storage (FILE_NOT_FOUND), or a related resource was not found.
- `422`: Malware detected (FILE_MALWARE_DETECTED), file could not be scanned (FILE_SCAN_UNSUPPORTED), or request validation failed.
- `423`: No malware scan result is available.
- `502`: OpenAI couldn't read the file.
- `503`: Malware scan result or file download is unavailable.

## Changes

- **2026-10-29** `6f428e2e2b98`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/chrt/apis/chrt-fastapi/changes/chrt_gpt/conversations/s3_objects/add/v1/:conversation_id/post.md)

---

[API](https://skmtc.dev/chrt/apis/chrt-fastapi.md) - [All operations](https://skmtc.dev/chrt/apis/chrt-fastapi/llms.txt) - [OpenAPI document](https://skmtc.dev/chrt/apis/chrt-fastapi/revisions/6f428e2e2b98?raw)
