Skip to main content
POST
Build a table from a file attached to an AI Assistant message

Authorizations

X-API-Key
string
header
required

Path Parameters

attachment_id
string<uuid>
required

Body

application/json

Build a table out of an attached file.

name
string
required

What to call the table. Unique in the workspace.

Required string length: 1 - 255
header_row
integer
default:0

For a file whose first row is a title: the row that holds the column names, numbered as a page of the file's rows numbers them (1 is the first row under the title). The table's columns are named from it and only the rows below it are added. 0 keeps the first row as the header.

Required range: x >= 0
row_ranges
ImportRowRangeSchema · object[] | null

Only these rows, the way a print dialog picks pages, numbered as a page of the file's rows numbers them and as header_row is: 1 is the row at offset 0, the first under the file's first row, and every row holding any text counts, a row of placeholders like N/A included. So with header_row 2 the rows under the column names start at 3. A row the table gets no value from (only placeholders, or the column names and the rows above them) is left out. At most 100 ranges once merged. Omit for every row.

Required array length: 1 - 1000 elements

Response

Successful Response

The table an attached file is becoming.

The table exists when this returns; its rows are still arriving, loaded in the background from the file's own rows. row_count is how many will land, which is the file's count clamped to the row ceiling, and the file's own count stands beside it so a caller can say when the two differ rather than pass the smaller number off as the whole file.

column_count
integer
required
file_row_count
integer
required

Rows in the file, as its attachment card counts them, less the header row named and the rows above it.

import_id
string<uuid>
required

The import job loading the rows, for polling.

limited_by
enum<string> | null
required

Whose ceiling it was: the plan's, which a bigger plan raises, or the deployment's, which none does. Null when nothing was cut.

Available options:
plan,
deployment
row_count
integer
required

Rows that will be added: the rows chosen, or the file's from the top.

row_limit
integer | null
required

The ceiling that cut the file short, or null when every row is being added.

table_id
string<uuid>
required
table_name
string
required