---
title: "Configure Custom Scoring"
method: PATCH
path: "/reports/{report_id}/score-card"
tags: ["reports"]
---

# Configure Custom Scoring

`PATCH /reports/{report_id}/score-card`

## Path parameters

- `report_id` integer, required

## Request body

- UpdateReportScoreCardRequest
  - `column_names` string[], required — Column names to include in the score calculation.
  - `code` string, nullable — Optional custom Python or JavaScript scoring code. The code receives data and must return an object with a score key.
  - `code_language` 'PYTHON' | 'JAVASCRIPT' — Language used by the custom scoring code.

## Response `200`

Score card updated.

- UpdateReportScoreCardResponse
  - `success` true, required
  - `report` EvaluationPipelineSummary, required
    - `id` integer
    - `name` string
    - `tags` string[]
    - `score_configuration` ScoreConfiguration — Custom scoring configuration. The code receives a data variable containing row dictionaries and must return an object with at least a score key from 0 to 100.
      - `code` string, required — Python or JavaScript code used to calculate the score.
      - `code_language` 'PYTHON' | 'JAVASCRIPT' — Language used by the scoring code.

## Other responses

- `401` — Unauthorized - missing or invalid API key.
- `404` — Not found - requested resource does not exist or is not accessible.
- `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)
