Skip to main content
POST
Add a file to send with an AI Assistant message

Authorizations

X-API-Key
string
header
required

Body

multipart/form-data
file
file
required

The .csv or .xlsx file to send.

Response

Successful Response

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.

created_at
string<date-time>
required
filename
string
required
id
string<uuid>
required
kind
enum<string>
required

What the file is: spreadsheet for a CSV or an Excel sheet.

Available options:
spreadsheet
row_count
integer
required

Data rows under the header row.

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 | null
required

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

size_bytes
integer
required