Skip to main content
POST
Create Sheet
Create a new sheet in a table. Three creation modes are supported:
  • Empty sheet — Omit source to create a blank sheet with a default Column A text column and one empty row. Returns 201 immediately. Use this when you want to add columns and rows incrementally via the Create Column and Add Rows endpoints.
  • file — Upload a CSV or JSON file (base64-encoded, max 100 MB). The import runs asynchronously; poll the operation endpoint to track progress. Returns 202.
  • request_logs — Import from your PromptLayer request history. Filter by prompt, version, label, or date range. Returns 202.
When source is omitted, operation_id is not allowed. When importing from a file or request logs, operation_id is optional for idempotency and status tracking.

Authorizations

X-API-KEY
string
header
required

Path Parameters

table_id
string<uuid>
required

Body

application/json
title
string | null

Sheet title. Defaults to 'Sheet N' when source is omitted, or to the source file name / 'Request Logs' for imports.

index
integer | null

Display position within the table (0-based). Defaults to appending at the end.

operation_id
string | null

Optional idempotency key for import operations. Not allowed when source is omitted.

source
File source · object

Optional data source for the sheet. Omit to create a blank sheet with a default Column A scaffold.

Response

Blank sheet created. Returns the sheet with a default Column A scaffold and one empty row.

success
boolean
sheet
object

A sheet within a Table.