---
title: "Read a file attached to an AI Assistant message"
method: GET
path: "/chat-attachments/{attachment_id}/"
tags: ["assistant"]
---

# Read a file attached to an AI Assistant message

`GET /chat-attachments/{attachment_id}/`

## Request

- Base URL: `https://api.getoneprofile.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.getoneprofile.ai/chat-attachments/{attachment_id}/`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Read what a file you attached is, as its card in the composer shows it: its name, its kind (`spreadsheet` or `pdf`), its size, a spreadsheet's columns and row count or a PDF's page count, and whether it was sent. Its contents are read through its rows or, for a PDF, its pages. Only your own files.

## Path parameters

- `attachment_id` string, uuid, required

## Response `200`

Successful Response

- ChatAttachmentReadSchema: One file attached to a chat message, as the card above the message draws it. The bytes are never returned; the shape is. ``columns`` and ``row_count`` are what a card and a model's first look need, and a page of rows is a separate read.
  - `column_count` integer, required
  - `columns` string[], required: The header row's names, in order; empty for a PDF.
  - `created_at` string, date-time, required
  - `filename` string, required
  - `id` string, uuid, required
  - `kind` 'spreadsheet' | 'pdf', required: What kind of thing a file the person attached is, for the card that shows it. Each kind is read by its own reader and drawn under its own icon: a CSV or an Excel file is a spreadsheet, rows under a header; a PDF is pages of text, and the rows of the table its pages hold when one is asked for.
  - `page_count` integer, nullable, required: A PDF's pages; null for a spreadsheet.
  - `row_count` integer, required: Data rows under the header row; 0 for a PDF, whose table is read into rows only when its rows are first read.
  - `sent` boolean, required: Whether the file has been sent with a message. A file added and never sent can be removed; one already sent stays with its message.
  - `sheet` string, nullable, required: The workbook sheet the rows were read from; null for a CSV or a PDF.
  - `size_bytes` integer, required

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: File not found
- `422`: Invalid request made to the API.
- `500`: Internal server error.
- `502`: Bad gateway error.
- `503`: Service unavailable.

---

[API](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile.md) · [All operations](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile/llms.txt) · [OpenAPI document](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile/revisions/4a6bd71e3f02?raw)
