---
title: "Create Sheet"
method: POST
path: "/api/public/v2/tables/{table_id}/sheets"
tags: ["smart-tables"]
---

# Create Sheet

`POST /api/public/v2/tables/{table_id}/sheets`

Create a new sheet in a table. Omit source to create a blank sheet with a default Column A scaffold (returns 201), or import data from a file (CSV or JSON, base64-encoded) or from request log history (returns 202). Requests are scoped to the workspace associated with the API key; table, sheet, column, cell, operation, and version IDs must belong to that workspace.

## Path parameters

- `table_id` string, uuid, required

## Request body

- object
  - `title` string, nullable — Sheet title. Defaults to 'Sheet N' when source is omitted, or to the source file name / 'Request Logs' for imports.
  - `index` integer, nullable — Display position within the table (0-based). Defaults to appending at the end.
  - `operation_id` string, nullable — Optional idempotency key for import operations. Not allowed when source is omitted.
  - `source` union — Optional data source for the sheet. Omit to create a blank sheet with a default Column A scaffold.
    - object
      - `type` 'file', required
      - `file_name` string, required — Original file name (must end in .csv or .json).
      - `file_content_base64` string, required — Base64-encoded file content (max 100 MB).
    - object
      - `type` 'request_logs', required
      - `request_log_ids` integer[], nullable — Specific request log IDs to import. When omitted, filter params are used.
      - `prompt_id` integer, nullable
      - `prompt_version_id` integer, nullable
      - `prompt_label_id` integer, nullable
      - `start_time` string, date-time, nullable
      - `end_time` string, date-time, nullable

## Response `201`

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

- object
  - `success` boolean
  - `sheet` Sheet — A sheet within a Table.
    - `id` string, uuid
    - `table_id` string, uuid
    - `workspace_id` integer — Workspace that owns this resource; determined by the authenticated request scope.
    - `title` string
    - `index` integer — Display order of the sheet within the table (0-based).
    - `row_count` integer
    - `version_count` integer — Current sheet version number. It increments when sheet data, layout, score configuration, imports, or execution output changes.
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Other responses

- `202` — Import started. Poll the operation endpoint to track progress.
- `400` — Invalid request
- `401` — Unauthorized - missing or invalid API key.
- `404` — Table not found
- `422` — Validation error - request parameters or body are invalid.

---

[API](https://skmtc.dev/promptlayer/apis/promptlayer-api.md) · [All operations](https://skmtc.dev/promptlayer/apis/promptlayer-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/promptlayer/promptlayer-api/revisions/a23093a0a506/schema)
