assistant

Read a file attached to an AI Assistant message

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.

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

Path parameters

attachment_idstring uuid required

Response

Successful Response

column_countinteger required
columnsstring[] required

The header row's names, in order; empty for a PDF.

created_atstring date-time required
filenamestring required
idstring 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_countinteger nullable required

A PDF's pages; null for a spreadsheet.

row_countinteger required

Data rows under the header row; 0 for a PDF, whose table is read into rows only when its rows are first read.

sentboolean 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.

sheetstring nullable required

The workbook sheet the rows were read from; null for a CSV or a PDF.

size_bytesinteger required

Changes

No recorded changes to this operation across all 1 revision of this API.