> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usefini.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Update a criterion
> Update one criterion on a test set.
Updates one criterion. For criteria created from a default, only `blocking` can be changed.
## Headers
<ParamField header="Authorization" type="string" required>
Bearer token containing your Fini workspace API key. Format: `Bearer fini_...` The key needs `write` scope.
</ParamField>
<ParamField header="Content-Type" type="string" required>
`application/json`
</ParamField>
## Path parameters
<ParamField path="testSetId" type="string" required>
Test set ID.
</ParamField>
<ParamField path="criteriaId" type="string" required>
Criterion ID.
</ParamField>
## Body parameters
<ParamField body="name" type="string">
New criterion name for custom criteria.
</ParamField>
<ParamField body="judgePrompt" type="string">
New judge prompt for judge criteria.
</ParamField>
<ParamField body="passPrompt" type="string">
New pass prompt for judge criteria.
</ParamField>
<ParamField body="failPrompt" type="string">
New fail prompt for judge criteria.
</ParamField>
<ParamField body="condition" type="object">
New condition for deterministic criteria.
</ParamField>
<ParamField body="blocking" type="boolean">
Whether failing this criterion should fail the conversation overall.
</ParamField>
<ParamField body="isActive" type="boolean">
Whether the criterion is active.
</ParamField>
## Response
Returns the updated [Criterion object](/en/api-reference/test-sets#criterion-object).
<RequestExample>
~~~bash cURL theme={null}
curl --request PATCH \
--url 'https://api-prod.usefini.com/v2/test-sets/44c1f705-8e1a-4f61-8c4c-d519d37fb6b7/criteria/96eab02d-3bc3-4b90-ae5b-1a41a1444afa/public' \
--header 'Authorization: Bearer fini_your_api_key' \
--header 'Content-Type: application/json' \
--data '{
"blocking": false,
"isActive": true
}'
~~~
~~~javascript Node.js theme={null}
const testSetId = '44c1f705-8e1a-4f61-8c4c-d519d37fb6b7';
const criteriaId = '96eab02d-3bc3-4b90-ae5b-1a41a1444afa';
const response = await fetch(`https://api-prod.usefini.com/v2/test-sets/${testSetId}/criteria/${criteriaId}/public`, {
method: 'PATCH',
headers: {
Authorization: 'Bearer fini_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
blocking: false,
isActive: true
})
});
const criterion = await response.json();
~~~
~~~python Python theme={null}
import requests
test_set_id = "44c1f705-8e1a-4f61-8c4c-d519d37fb6b7"
criteria_id = "96eab02d-3bc3-4b90-ae5b-1a41a1444afa"
response = requests.patch(
f"https://api-prod.usefini.com/v2/test-sets/{test_set_id}/criteria/{criteria_id}/public",
headers={
"Authorization": "Bearer fini_your_api_key",
"Content-Type": "application/json",
},
json={
"blocking": False,
"isActive": True,
},
)
criterion = response.json()
~~~
</RequestExample>
<ResponseExample>
~~~json 200 OK theme={null}
{
"id": "96eab02d-3bc3-4b90-ae5b-1a41a1444afa",
"testSetId": "44c1f705-8e1a-4f61-8c4c-d519d37fb6b7",
"companyId": "1d2a4c9f-59f8-4f9c-bd36-6f12e0d5d927",
"defaultCriterionId": null,
"name": "Goal resolution",
"type": "complex_judge",
"judgePrompt": "Judge whether the conversation resolved the user's goal.",
"passPrompt": "The user's goal was resolved.",
"failPrompt": "The user's goal was not resolved.",
"condition": null,
"blocking": false,
"isActive": true,
"createdAt": "2026-07-28T08:56:12.000Z",
"updatedAt": "2026-07-28T09:12:45.000Z"
}
~~~
</ResponseExample>
## Related topics
- [Overview](/en/api-reference/test-sets.md)
- [Delete a criterion](/en/api-reference/delete-test-set-criterion.md)
- [API overview](/en/api-reference/overview.md)
This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.
Test Sets

