Add a data input table to a draft
This endpoint requires edit access to the specified document and permissions to edit the document’s model. The connection the document is built on must have a configured table upload schema.
Add a data input table to a draft from rows in the request body. A CSV file is not accepted yet — convert it to rows first.
The rows become a private table in the connection’s upload schema, a view and a topic on the document’s workbook model, and a tab on the draft. The table only exists in the document’s model.
Publish the draft with the Publish draft endpoint to make the table available in the published document.
Authorizations
Can be either an Organization API Key or Personal Access Token (PAT).
Include in the Authorization header as: Bearer YOUR_TOKEN
Path Parameters
Draft identifier. Use List document drafts to retrieve draft IDs.
"def456"
Body
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.
Response
The table was created and a tab added. queryKey is the new tab's key in the draft's queryPresentations.data.

