Skip to main content
PATCH
Configure Table Sheet Score
Configure scoring for a sheet. Use column_ids or column_names for standard boolean or numeric scoring. Column names must be unique in the sheet. Use score_type with score_config for explicit configuration. Supported scoring modes are auto, boolean, numeric, and custom; score_type is required when you pass score_config. For custom scoring, pass code and optionally code_language (PYTHON by default, or JAVASCRIPT). Boolean scoring also supports true_values, false_values, and assertion_aggregation (all, any, or mean). This endpoint updates the configuration and returns requires_recalculation; call the recalculation endpoint to queue score calculation. Changing score configuration creates a new sheet version. The response returns version, the current sheet version count after the configuration update.

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
score_type
enum<string> | null

Scoring mode. Required when score_config is provided.

Available options:
auto,
boolean,
numeric,
custom
score_config
object | null

Explicit score configuration.

column_ids
string<uuid>[] | null

Column IDs to score.

column_names
string[] | null

Column titles to score. Titles must be unique in the sheet.

code
string | null

Custom scoring code.

Required string length: 1 - 50000
code_language
enum<string>
default:PYTHON
Available options:
PYTHON,
JAVASCRIPT
true_values
string[] | null

Values treated as true for boolean scoring.

false_values
string[] | null

Values treated as false for boolean scoring.

assertion_aggregation
enum<string> | null

Aggregation mode for assertion-style boolean scoring.

Available options:
all,
any,
mean

Response

Score configuration updated.

success
boolean
required
message
string
required
score_configuration_id
string<uuid>
required
status
string | null
required

Returned as null by this endpoint. Use the recalculation endpoint to queue score calculation.

requires_recalculation
boolean
required

Always true after updating the score configuration.

version
integer
required