---
search:
  tags:
    - V1
    - PATCH
seo:
  description: >-
    Update a judge description and/or create one complete… Reference for the
    PATCH /v1/projects/{projectId}/judges/{judgeId} endpoint in the Judgeval
    API.
sidebar:
  label: Update judge
  badge: PATCH
title: Update judge
type: openapi-operation
---
Update a judge description and/or create one complete immutable judge version. A new version requires an explicit target version, the existing judge and score types, a complete implementation config, outputs, and monitoring-settings snapshot. Categorical outputs may reference existing labels by ID or define new labels. Code judge versions take a base64-encoded tar.gz bundle, or a sourceVersion whose stored code to reuse. Alternatively, newVersionFromSource copies sourceVersion and changes only the fields you set. Set promoteToProduction to make the new version production; latest is inferred automatically. Judge and score types cannot change.

`PATCH /v1/projects/{projectId}/judges/{judgeId}`

**Request body** (`application/json`, required)

- `update` (object, required)

Request body example:

```json
{
  "update": {
    "judgeDescription": "string",
    "newVersion": {
      "actionConfig": {
        "action_groups": [
          {
            "id": "string",
            "name": "string",
            "enabled": true,
            "environment_names": [
              "string"
            ],
            "when": {
              "kind": "any"
            },
            "frequency": {
              "count": 1,
              "window_seconds": 1
            },
            "cooldown_seconds": 0,
            "actions": [
              {
                "id": "string",
                "enabled": true,
                "type": "webhook",
                "config": {
                  "url": "string",
                  "secret": "string"
                }
              }
            ]
          }
        ]
      },
      "targetVersion": {
        "major": 0,
        "minor": 0
      },
      "promoteToProduction": true,
      "advancedSettings": {
        "online_environment_names": [
          "string"
        ],
        "online_evaluation_mode": "continuous",
        "online_sampling_rate": 0,
        "online_span_triggers": {},
        "online_session_scoring": true,
        "session_evaluation_count_enabled": true,
        "session_evaluation_idle_enabled": true,
        "session_evaluation_min_candidate_traces": 0,
        "session_evaluation_max_wait_minutes": 1
      },
      "judgeType": "prompt",
      "config": {
        "prompt": "string",
        "description": "string",
        "reasoningLevel": "lite",
        "minScore": 0,
        "maxScore": 0
      },
      "scoreType": "binary"
    },
    "newVersionFromSource": {
      "sourceVersion": {
        "major": 0,
        "minor": 0
      },
      "targetVersion": {
        "major": 0,
        "minor": 0
      },
      "promoteToProduction": true,
      "advancedSettings": {
        "online_environment_names": [
          "string"
        ],
        "online_evaluation_mode": "continuous",
        "online_sampling_rate": 0,
        "online_span_triggers": {},
        "online_session_scoring": true,
        "session_evaluation_count_enabled": true,
        "session_evaluation_idle_enabled": true,
        "session_evaluation_min_candidate_traces": 0,
        "session_evaluation_max_wait_minutes": 1
      },
      "outputs": [
        {
          "behaviorId": "string"
        },
        {
          "behaviorId": "string"
        }
      ],
      "config": {
        "prompt": "string",
        "description": "string",
        "reasoningLevel": "lite",
        "minScore": 0,
        "maxScore": 0,
        "bundleBase64": "string",
        "entrypointPath": "string",
        "requirementsPath": "string",
        "className": "string",
        "scorerType": "example",
        "sdkVersion": 1,
        "expression": null
      }
    }
  }
}
```

**Responses**

- `200` — Response for status 200

Response example, 200:

```json
{
  "judge_id": "string",
  "judge_version_id": "string",
  "implementation_id": "string"
}
```
