Skip to main content
POST
/
api
/
public
/
v2
/
tables
/
{table_id}
/
sheets
Create Sheet
curl --request POST \
  --url https://api.promptlayer.com/api/public/v2/tables/{table_id}/sheets \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "source": {
    "file_name": "<string>",
    "file_content_base64": "<string>"
  },
  "title": "<string>",
  "index": 123,
  "operation_id": "<string>"
}
'
{
  "success": true,
  "message": "<string>",
  "operation_id": "<string>",
  "operation": {
    "operation_id": "<string>",
    "progress": 123,
    "message": "<string>",
    "rows_added": 123,
    "row_count": 123,
    "file_name": "<string>",
    "error_message": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  },
  "sheet": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "table_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "workspace_id": 123,
    "title": "<string>",
    "index": 123,
    "row_count": 123,
    "version_count": 123,
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://promptlayer-claude-nice-fermi-nop3f.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Create a new sheet in a table by importing data. Two source types are supported:
  • file — Upload a CSV or JSON file (base64-encoded, max 100 MB). The import runs asynchronously; poll the operation endpoint to track progress.
  • request_logs — Import from your PromptLayer request history. Filter by prompt, version, label, or date range.

Authorizations

X-API-KEY
string
header
required

Path Parameters

table_id
string<uuid>
required

Body

application/json
source
File source · object
required

Data source for the sheet.

title
string | null

Sheet title. Defaults to the source file name or 'Request Logs'.

index
integer | null

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

operation_id
string | null

Optional idempotency key for the import operation.

Response

Import started. Poll the operation endpoint to track progress.

success
boolean
message
string
operation_id
string
operation
object

Status of an asynchronous sheet import operation.

sheet
object

A sheet within a Smart Table.