---
title: "Finalize Assistant Attachment"
method: POST
path: "/api/v1/assistant-attachments/{attachment_id}/finalize"
tags: ["authed"]
---

# Finalize Assistant Attachment

`POST /api/v1/assistant-attachments/{attachment_id}/finalize`

## Request

- Base URL: `https://api.teaflask.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.teaflask.com/api/v1/assistant-attachments/{attachment_id}/finalize`
- Auth: none declared

Step two, after the PUT: verify the object arrived, sniff what it
actually is (the bytes decide — the filename only ever picks among
text formats), enforce its kind's size cap, and flip the row ready.
Idempotent: a replayed finalize reads the settled row back.

## Path parameters

- `attachment_id` string, uuid, required

## Response `200`

Successful Response

- AssistantAttachmentResponse
  - `id` string, uuid, required
  - `kind` 'image' | 'document' | 'video' | 'audio' | 'file', required: The assistant_attachments kind CHECK's closed set.
  - `format` string, nullable, required
  - `filename` string, required
  - `byte_size` integer, required
  - `ready` boolean, required

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `405`: Method not allowed
- `409`: The upload hasn't arrived yet
- `413`: The file is over its kind's cap
- `422`: Validation error
- `500`: Internal server error
- `503`: Attachments not configured

---

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