Skip to Content
Eval checks

Update an eval check

Permissioneval-checks:updateAdd-onEvaluationsAuthentication
PATCH
/eval-checks/{id}

Replaces only the supplied mutable fields — name, description, config. The edit is live on the next run.

A supplied config replaces the stored one and is validated in full.

Immutable fields

kind, slug and template_key cannot change. Sending one returns 422 validation_failed with field code immutable — create a new check instead.

Limits — the encoded config is capped at 131,072 bytes and the complete request body at 262,144 bytes.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Use a Voice API key or connected-app OAuth access token. Authentication.

Path Parameters

id*string
Formatuuid

Request Body

application/json
  1. body

Edits the check in place. The edit is live on the next run; verdicts already recorded keep their score and reasoning. kind, slug and template_key are fixed at creation: sending any of them returns 422 validation_failed with field code immutable — create a new check instead. A supplied config replaces the stored one and is validated in full against the check's kind and the config's rule.

name?string
Length1 <= length <= 200
description?|
Lengthlength <= 2000
config?||||||||||||||||||||||||

A check's assertion. Exactly one shape applies: a judge check takes EvalCheckJudgeConfig (no rule); a tool or flow check takes the schema for its rule. Every key is closed — the server rejects an unknown key, a missing required key, or a wrong type with 422 validation_failed and the field path (for example config.expected), because the evaluator would otherwise ignore the key and silently grade against a default. Tool rules: called (tool, phase?, min?, max?), not_called (tool, phase?), called_with (tool, args, phase?, match?), called_before (tool, other_tool), succeeded (tool, phase?), failed (tool, phase?, error_kind?), result_matches (tool, expected, jsonpath?, phase?), no_unexpected_tools (allowlist), phase (tool, expected_phase). Flow rules: terminal_node (value), path_contains (value), slot_recorded (slot, expected?), max_turns (max), end_reason (value), transcript_matches (pattern, speaker?, expect?), pre_call_status (tool, status?), pre_call_var_set (value), pre_call_aborted (expect?). A few rules also accept a legacy spelling of their key (node, var, value) — send one spelling, not both.

Response Body

The updated check.

application/json
  1. response

One library check: the list projection plus its kind-specific config.

id*string
Formatuuid
slug*string
Match^[a-z0-9][a-z0-9_-]{1,63}$
Length2 <= length <= 64
name*string
Length1 <= length <= 200
description*|
Lengthlength <= 2000
kind*string
Value in"judge""tool""flow"
source_template_key*|
Lengthlength <= 128
archived_at*|
Formatdate-time
created_at*string
Formatdate-time
updated_at*string
Formatdate-time
config*

A check's config exactly as stored. Every check created or edited since config validation shipped conforms to EvalCheckConfig; a check last edited before that may still carry keys outside it until its config is next updated (the update is validated in full).

Example Request
curl -X PATCH 'https://api.kejue.co/v1/eval-checks/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "slug": "string",  "name": "string",  "description": "string",  "kind": "judge",  "source_template_key": "string",  "archived_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "config": {}}