Skip to main content
POST
/
api
/
public
/
v2
/
tables
/
{table_id}
/
sheets
/
{sheet_id}
/
versions
Create Table Sheet Version
curl --request POST \
  --url https://api.promptlayer.com/api/public/v2/tables/{table_id}/sheets/{sheet_id}/versions \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "name": "<string>",
  "source_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
{
  "success": true,
  "version": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "sheet_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "version_number": 123,
    "name": "<string>",
    "created_by": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "metadata": {},
    "deltas": [
      {}
    ],
    "snapshot": {},
    "score": {},
    "score_configuration": {}
  }
}
Create a named version for a sheet. Pass name to save the current sheet state. name is required when source_version_id is omitted. Pass source_version_id to restore from an existing version while creating a new version.

Authorizations

X-API-KEY
string
header
required

Headers

X-API-KEY
string
required

Your PromptLayer API key. The key's workspace scopes table resources for this request.

Path Parameters

table_id
string<uuid>
required

Table ID.

sheet_id
string<uuid>
required

Table sheet ID.

Body

application/json
name
string | null

Version name. Required when source_version_id is omitted.

Required string length: 1 - 255
source_version_id
string<uuid> | null

Existing version to restore from while creating a new version.

Response

Version created.

success
boolean
required
version
TableSheetVersion · object
required