# Update an eval case.

Source: <https://everruns.com/docs/api/operations/update_eval_case/>

PATCH

/v1/evals/{eval\_id}/cases/{case\_id}

Select code samplecURL (shell:curl)

```js
const url = 'https://app.everruns.com/api/v1/evals/example/cases/example';
const options = {
  method: 'PATCH',
  headers: {'Content-Type': 'application/json'},
  body: '{"artifacts":[{"name":"patch","path":"/workspace/fix.patch"}],"conversation":[{"content":"Fix the failing test in src/lib.rs"}],"description":"Agent fixes a failing unit test","max_turns":10,"name":"fix-failing-test","position":0,"post":[{"content":"Run the tests again and report the result"}],"scorers":[{"text":"tests pass","type":"contains"}],"tags":["regression","nightly"],"target":{"agent_id":"example","harness_id":"example","harness_name":"example","max_iterations":1,"model_id":"example","system_prompt":"example","type":"session"},"timeout_seconds":120}'
};


try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```sh
curl --request PATCH \
  --url https://app.everruns.com/api/v1/evals/example/cases/example \
  --header 'Content-Type: application/json' \
  --data '{ "artifacts": [ { "name": "patch", "path": "/workspace/fix.patch" } ], "conversation": [ { "content": "Fix the failing test in src/lib.rs" } ], "description": "Agent fixes a failing unit test", "max_turns": 10, "name": "fix-failing-test", "position": 0, "post": [ { "content": "Run the tests again and report the result" } ], "scorers": [ { "text": "tests pass", "type": "contains" } ], "tags": [ "regression", "nightly" ], "target": { "agent_id": "example", "harness_id": "example", "harness_name": "example", "max_iterations": 1, "model_id": "example", "system_prompt": "example", "type": "session" }, "timeout_seconds": 120 }'
```

* Production APIapp.everruns.com/api/v1/evals/{eval\_id}/cases/{case\_id}

## Parameters

### Path Parameters

**eval\_id**

required

string

Prefixed public identifier

**case\_id**

required

string

Prefixed public identifier

## Request Bodyrequired

Media typeapplication/json

Request to update an eval case

object

**artifacts**

Session files to capture after scoring completes.

Array\<object> | null

Named session file to collect after an eval case completes.

object

**name**

required

Export key for this artifact (for example `patch` or `log`).

string

##### Example

```plaintext
patch
```

**path**

required

Absolute path in the session filesystem.

string

##### Example

```plaintext
/workspace/fix.patch
```

##### Example

```json
[
  {
    "name": "patch",
    "path": "/workspace/fix.patch"
  }
]
```

**conversation**

Input messages sent to the agent sequentially.

Array\<object> | null

A message to send to the agent during an eval case.

object

**content**

required

The text content to send.

string

##### Example

```plaintext
Fix the failing test in src/lib.rs
```

##### Example

```json
[
  {
    "content": "Fix the failing test in src/lib.rs"
  }
]
```

**description**

Human-readable description. Safe to render in user-facing messages.

string | null

##### Example

```plaintext
Agent fixes a failing unit test
```

**max\_turns**

Maximum agent turns before the case stops.

integer | null format: int32

##### Example

```json
10
```

**name**

Human-readable name. Safe to render in user-facing messages.

string | null

##### Example

```plaintext
fix-failing-test
```

**position**

Display order within the eval.

integer | null format: int32

##### Example

```json
0
```

**post**

Verification messages sent after conversation completes.

Array\<object> | null

A message to send to the agent during an eval case.

object

**content**

required

The text content to send.

string

##### Example

```plaintext
Fix the failing test in src/lib.rs
```

##### Example

```json
[
  {
    "content": "Run the tests again and report the result"
  }
]
```

**scorers**

Scoring rules applied to the case output.

Array | null

One of:

* object

  Final assistant message contains substring.

  object

  **text**

  required

  string

  **type**

  required

  string

  Allowed values: contains

  **weight**

  number format: double

* object

  Final assistant message does NOT contain substring.

  object

  **text**

  required

  string

  **type**

  required

  string

  Allowed values: not\_contains

  **weight**

  number format: double

* object

  Final assistant message matches regex pattern.

  object

  **pattern**

  required

  string

  **type**

  required

  string

  Allowed values: regex

  **weight**

  number format: double

* object

  Agent called named tool at least `min` times.

  object

  **min**

  integer format: int32

  **tool**

  required

  string

  **type**

  required

  string

  Allowed values: tool\_called

  **weight**

  number format: double

* object

  Agent did NOT call named tool.

  object

  **tool**

  required

  string

  **type**

  required

  string

  Allowed values: tool\_not\_called

  **weight**

  number format: double

* object

  Total tool calls within range.

  object

  **max**

  integer | null format: int32

  **min**

  integer | null format: int32

  **type**

  required

  string

  Allowed values: tool\_call\_count

  **weight**

  number format: double

* object

  Completed within N turns.

  object

  **max**

  required

  integer format: int32

  **type**

  required

  string

  Allowed values: turns\_within

  **weight**

  number format: double

* object

  Session filesystem file contains substring.

  object

  **path**

  required

  string

  **text**

  required

  string

  **type**

  required

  string

  Allowed values: file\_contains

  **weight**

  number format: double

* object

  Final assistant message parses as JSON matching schema.

  object

  **schema**

  required

  **type**

  required

  string

  Allowed values: json\_schema

  **weight**

  number format: double

* object

  Citation faithfulness: the answer’s citations must cover the claim and be verified as supported. Scored from the `TextAnnotation`s on the final message — pair with the `citation_verification` capability so verdicts are present.

  object

  **min\_citations**

  Minimum number of citations the answer must carry.

  integer format: int32

  ##### Example

  ```json
  1
  ```

  **pass\_threshold**

  Minimum fraction of citations verified `entailed` to pass.

  number format: double

  ##### Example

  ```json
  0.8
  ```

  **type**

  required

  string

  Allowed values: citation\_faithful

  **weight**

  Relative weight of this scorer in the case’s weighted average.

  number format: double

  ##### Example

  ```json
  1
  ```

* object

  Citation faithfulness judged by an LLM: each cited claim/source pair is graded by a model, so the eval works even without the `citation_verification` capability.

  object

  **model\_id**

  One of:

  * string

    Judge model; the org’s default is used when absent.

    string

    /^model\_\[0-9a-f]{32}$/

    ##### Example

    ```plaintext
    model_01933b5a000070008000000000000001
    ```

  * null

    null

  **pass\_threshold**

  Minimum judged score `[0,1]` to pass.

  number format: double

  ##### Example

  ```json
  0.8
  ```

  **rubric**

  Rubric override; a citation-faithfulness rubric is used when absent.

  string | null

  ##### Example

  ```plaintext
  Score the fraction of cited claims supported by their source.
  ```

  **type**

  required

  string

  Allowed values: citation\_judged

  **weight**

  Relative weight of this scorer in the case’s weighted average.

  number format: double

  ##### Example

  ```json
  1
  ```

* string

  Judge model; the org’s default is used when absent.

  string

  /^model\_\[0-9a-f]{32}$/

  ##### Example

  ```plaintext
  model_01933b5a000070008000000000000001
  ```

* null

  null

##### Example

```json
[
  {
    "text": "tests pass",
    "type": "contains"
  }
]
```

**tags**

Free-form tags attached to this resource.

Array\<string> | null

##### Example

```json
[
  "regression",
  "nightly"
]
```

**target**

One of:

* object

  One of:

  * object

    Session creation parameters (mirrors CreateSessionRequest).

    object

    **agent\_id**

    Agent to work in this session.

    string | null

    **harness\_id**

    Harness for the session. If omitted, org default harness is used.

    string | null

    **harness\_name**

    Addressable harness name (alternative to harness\_id).

    string | null

    **max\_iterations**

    Max LLM iterations per turn.

    integer | null

    **model\_id**

    LLM model override.

    string | null

    **system\_prompt**

    System prompt override (prepended to agent prompt).

    string | null

    **type**

    required

    string

    Allowed values: session

  * object

    Reference to a deployed app.

    object

    **app\_id**

    required

    string

    **type**

    required

    string

    Allowed values: app

  * object

    Label-only target for externally-executed runs (e.g. imported from Mira).

    Carries provider/model labels and opaque params instead of session setup: external runs are ingested already-complete, so everruns never builds a session from this. Mirrors a provider-agnostic `(provider, model)` pair.

    object

    **model**

    required

    string

    **params**

    **provider**

    required

    string

    **type**

    required

    string

    Allowed values: external

* null

  Session creation parameters (mirrors CreateSessionRequest).

  object

  **agent\_id**

  Agent to work in this session.

  string | null

  **harness\_id**

  Harness for the session. If omitted, org default harness is used.

  string | null

  **harness\_name**

  Addressable harness name (alternative to harness\_id).

  string | null

  **max\_iterations**

  Max LLM iterations per turn.

  integer | null

  **model\_id**

  LLM model override.

  string | null

  **system\_prompt**

  System prompt override (prepended to agent prompt).

  string | null

  **type**

  required

  string

  Allowed values: session

* object

  Reference to a deployed app.

  object

  **app\_id**

  required

  string

  **type**

  required

  string

  Allowed values: app

* object

  Label-only target for externally-executed runs (e.g. imported from Mira).

  Carries provider/model labels and opaque params instead of session setup: external runs are ingested already-complete, so everruns never builds a session from this. Mirrors a provider-agnostic `(provider, model)` pair.

  object

  **model**

  required

  string

  **params**

  **provider**

  required

  string

  **type**

  required

  string

  Allowed values: external

* object

  null

**timeout\_seconds**

Per-case timeout in seconds.

integer | null format: int32

##### Example

```json
120
```

## Responses

### 200

Success

Media typeapplication/json

A single test case within an eval.

object

**artifacts**

Session files to collect after scoring completes.

Array\<object> | null

Named session file to collect after an eval case completes.

object

**name**

required

Export key for this artifact (for example `patch` or `log`).

string

**path**

required

Absolute path in the session filesystem.

string

**conversation**

required

Input messages sent sequentially.

Array\<object>

A message to send to the agent during an eval case.

object

**content**

required

The text content to send.

string

**created\_at**

required

When the case was created.

string format: date-time

**description**

Optional description of what the case checks.

string | null

**id**

required

External identifier (evalcase\_<32-hex>).

string

**max\_turns**

Max agent turns (default: 10).

integer | null format: int32

**name**

required

Case name.

string

**position**

required

Display order.

integer format: int32

**post**

Verification messages sent after conversation completes and session idles. Scorers run after post messages complete (not after conversation).

Array\<object> | null

A message to send to the agent during an eval case.

object

**content**

required

The text content to send.

string

**scorers**

required

Scoring rules.

Array

One of:

* object

  Final assistant message contains substring.

  object

  **text**

  required

  string

  **type**

  required

  string

  Allowed values: contains

  **weight**

  number format: double

* object

  Final assistant message does NOT contain substring.

  object

  **text**

  required

  string

  **type**

  required

  string

  Allowed values: not\_contains

  **weight**

  number format: double

* object

  Final assistant message matches regex pattern.

  object

  **pattern**

  required

  string

  **type**

  required

  string

  Allowed values: regex

  **weight**

  number format: double

* object

  Agent called named tool at least `min` times.

  object

  **min**

  integer format: int32

  **tool**

  required

  string

  **type**

  required

  string

  Allowed values: tool\_called

  **weight**

  number format: double

* object

  Agent did NOT call named tool.

  object

  **tool**

  required

  string

  **type**

  required

  string

  Allowed values: tool\_not\_called

  **weight**

  number format: double

* object

  Total tool calls within range.

  object

  **max**

  integer | null format: int32

  **min**

  integer | null format: int32

  **type**

  required

  string

  Allowed values: tool\_call\_count

  **weight**

  number format: double

* object

  Completed within N turns.

  object

  **max**

  required

  integer format: int32

  **type**

  required

  string

  Allowed values: turns\_within

  **weight**

  number format: double

* object

  Session filesystem file contains substring.

  object

  **path**

  required

  string

  **text**

  required

  string

  **type**

  required

  string

  Allowed values: file\_contains

  **weight**

  number format: double

* object

  Final assistant message parses as JSON matching schema.

  object

  **schema**

  required

  **type**

  required

  string

  Allowed values: json\_schema

  **weight**

  number format: double

* object

  Citation faithfulness: the answer’s citations must cover the claim and be verified as supported. Scored from the `TextAnnotation`s on the final message — pair with the `citation_verification` capability so verdicts are present.

  object

  **min\_citations**

  Minimum number of citations the answer must carry.

  integer format: int32

  **pass\_threshold**

  Minimum fraction of citations verified `entailed` to pass.

  number format: double

  **type**

  required

  string

  Allowed values: citation\_faithful

  **weight**

  Relative weight of this scorer in the case’s weighted average.

  number format: double

* object

  Citation faithfulness judged by an LLM: each cited claim/source pair is graded by a model, so the eval works even without the `citation_verification` capability.

  object

  **model\_id**

  One of:

  * string

    Judge model; the org’s default is used when absent.

    string

    /^model\_\[0-9a-f]{32}$/

  * null

    null

  **pass\_threshold**

  Minimum judged score `[0,1]` to pass.

  number format: double

  **rubric**

  Rubric override; a citation-faithfulness rubric is used when absent.

  string | null

  **type**

  required

  string

  Allowed values: citation\_judged

  **weight**

  Relative weight of this scorer in the case’s weighted average.

  number format: double

* string

  Judge model; the org’s default is used when absent.

  string

  /^model\_\[0-9a-f]{32}$/

* null

  null

**tags**

Free-form tags for filtering runs.

Array\<string>

**target**

One of:

* object

  One of:

  * object

    Session creation parameters (mirrors CreateSessionRequest).

    object

    **agent\_id**

    Agent to work in this session.

    string | null

    **harness\_id**

    Harness for the session. If omitted, org default harness is used.

    string | null

    **harness\_name**

    Addressable harness name (alternative to harness\_id).

    string | null

    **max\_iterations**

    Max LLM iterations per turn.

    integer | null

    **model\_id**

    LLM model override.

    string | null

    **system\_prompt**

    System prompt override (prepended to agent prompt).

    string | null

    **type**

    required

    string

    Allowed values: session

  * object

    Reference to a deployed app.

    object

    **app\_id**

    required

    string

    **type**

    required

    string

    Allowed values: app

  * object

    Label-only target for externally-executed runs (e.g. imported from Mira).

    Carries provider/model labels and opaque params instead of session setup: external runs are ingested already-complete, so everruns never builds a session from this. Mirrors a provider-agnostic `(provider, model)` pair.

    object

    **model**

    required

    string

    **params**

    **provider**

    required

    string

    **type**

    required

    string

    Allowed values: external

* null

  Session creation parameters (mirrors CreateSessionRequest).

  object

  **agent\_id**

  Agent to work in this session.

  string | null

  **harness\_id**

  Harness for the session. If omitted, org default harness is used.

  string | null

  **harness\_name**

  Addressable harness name (alternative to harness\_id).

  string | null

  **max\_iterations**

  Max LLM iterations per turn.

  integer | null

  **model\_id**

  LLM model override.

  string | null

  **system\_prompt**

  System prompt override (prepended to agent prompt).

  string | null

  **type**

  required

  string

  Allowed values: session

* object

  Reference to a deployed app.

  object

  **app\_id**

  required

  string

  **type**

  required

  string

  Allowed values: app

* object

  Label-only target for externally-executed runs (e.g. imported from Mira).

  Carries provider/model labels and opaque params instead of session setup: external runs are ingested already-complete, so everruns never builds a session from this. Mirrors a provider-agnostic `(provider, model)` pair.

  object

  **model**

  required

  string

  **params**

  **provider**

  required

  string

  **type**

  required

  string

  Allowed values: external

* object

  null

**timeout\_seconds**

Per-case timeout in seconds (default: 120).

integer | null format: int32

**updated\_at**

required

When the case was last updated.

string format: date-time

##### Example

```json
{
  "artifacts": [
    {
      "name": "patch",
      "path": "/workspace/fix.patch"
    }
  ],
  "conversation": [
    {
      "content": "Fix the failing test in src/lib.rs"
    }
  ],
  "created_at": "2026-01-15T10:30:00Z",
  "description": "Agent fixes a failing unit test",
  "id": "evalcase_01933b5a000070008000000000000001",
  "max_turns": 10,
  "name": "fix-failing-test",
  "position": 0,
  "post": [
    {
      "content": "Run the tests again and report the result"
    }
  ],
  "scorers": [
    {
      "text": "tests pass",
      "type": "contains"
    }
  ],
  "tags": [
    "regression",
    "nightly"
  ],
  "target": {
    "type": "session"
  },
  "timeout_seconds": 120,
  "updated_at": "2026-01-15T10:30:00Z"
}
```

### 404

Eval case not found