Skip to main content
POST
Create Sheet
Create a new sheet and start an asynchronous import job. The response returns immediately with 202, an operation_id, the import operation, and the newly created sheet.

File imports

Use source.type=file to import CSV or JSON content. Send the file content as base64 in file_content_base64; the decoded file can be up to 100MB. JSON input is converted to CSV before processing.

Request log imports

Use source.type=request_logs to import request history into a sheet. Provide either explicit request_log_ids or a request-log filter_group. You can also pass variables_to_parse, include_fields, and limit to control the imported columns and rows.

Operation tracking

Pass operation_id when you want a stable client-side identifier for polling and webhook correlation. If omitted, PromptLayer generates one. Poll Get Table Sheet Import Operation until the operation reaches succeeded or failed.

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.