> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pathors.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Test Case

> Update a test case by ID

## Request

```bash theme={null}
PUT https://api.pathors.com/v1/projects/{projectId}/test-cases/{testCaseId}
```

### Path Parameters

<ParamField path="projectId" type="string" required>The project ID</ParamField>

<ParamField path="testCaseId" type="string" required>The test case ID</ParamField>

### Headers

<ParamField header="Authorization" type="string" required>
  Bearer token using your developer key
</ParamField>

### Body

<ParamField body="name" type="string">
  Updated name for the test case
</ParamField>

<ParamField body="systemPrompt" type="string">
  Updated system prompt
</ParamField>

<ParamField body="maxTurns" type="integer">
  Updated maximum number of conversation turns (minimum 1)
</ParamField>

<ParamField body="variables" type="object">
  Updated key-value pairs of variables
</ParamField>

## Response

<ResponseField name="data" type="object">
  The updated test case object.
</ResponseField>

### Example

```bash theme={null}
curl -X PUT https://api.pathors.com/v1/projects/{projectId}/test-cases/{testCaseId} \
  -H "Authorization: Bearer dk_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated greeting flow",
    "maxTurns": 10
  }'
```

```json theme={null}
{
  "data": {
    "id": "test-case-uuid",
    "projectId": "project-uuid",
    "name": "Updated greeting flow",
    "systemPrompt": "You are a helpful assistant",
    "maxTurns": 10,
    "variables": {},
    "acceptanceCriteria": [],
    "createdAt": "2026-03-23T00:00:00.000Z",
    "updatedAt": "2026-03-23T00:00:00.000Z"
  }
}
```
