Skip to main content
POST
Add a data input table to a draft

Authorizations

Authorization
string
header
required

Can be either an Organization API Key or Personal Access Token (PAT).

Include in the Authorization header as: Bearer YOUR_TOKEN

Path Parameters

draftIdentifier
string
required

Draft identifier. Use List document drafts to retrieve draft IDs.

Example:

"def456"

identifier
string
required

Published document identifier.

Example:

"abc123"

Body

application/json
columns
object[]
required

Every column of the table, in order.

Required array length: 1 - 100 elements
Example:
name
string
required

The name of the view in the document's workbook model that uniquely identifies the table. This name is also used for the table's topic and workbook tab.

Pattern: ^[a-z][a-z0-9_]*$
Example:

"dismissals"

keyColumns
array

Supported for Postgres, Snowflake, Databricks, Lakebase, BigQuery, Redshift, SQL Server, Fabric, and MotherDuck connections.

The column(s) that uniquely identify a row. null or an empty value means the table doesn't have a key. If a key is set, every row must have a value for each key column.

See Setting keys for more information, including how to write to the table in apps.

rows
object[]

The rows, each an object keyed by column name. For an empty cell, omit the column or pass null. For ane mpty table, omit entirely.

Maximum array length: 1000
Example:

Response

The table was created and a tab added. queryKey is the new tab's key in the draft's queryPresentations.data.

draftIdentifier
string
required

Identifier of the draft the table was added to.

identifier
string
required

Published document identifier.

keyColumns
string[] | null
required

The key the table was given, or null.

queryKey
string
required

Record key of the tab added for the table in queryPresentations.data.

Example:

"3"

topicName
string
required

The topic the table can be queried through.

Example:

"dismissals"

truncated
boolean
required

Whether the rows were cut at the upload row limit.

viewName
string
required

The view the table's rows live in.

Example:

"dismissals"