curl --request PATCH \
--url 'https://api-prod.usefini.com/v2/test-suite/criteria-groups/00000000-0000-4000-8000-000000000003/public' \
--header 'Authorization: Bearer fini_your_api_key' \
--header 'Content-Type: application/json' \
--data '{
"botId": "00000000-0000-4000-8000-000000000001",
"name": "Refund checks",
"criteria": [
{
"name": "No handoff",
"type": "deterministic",
"condition": {
"scope": "SCALAR",
"predicate": {
"left": {
"path": "escalated",
"dataType": "boolean"
},
"operator": "==",
"right": {
"value": false
}
}
},
"blocking": true
}
],
"impactToken": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}'
const body = {
"botId": "00000000-0000-4000-8000-000000000001",
"name": "Refund checks",
"criteria": [
{
"name": "No handoff",
"type": "deterministic",
"condition": {
"scope": "SCALAR",
"predicate": {
"left": {
"path": "escalated",
"dataType": "boolean"
},
"operator": "==",
"right": {
"value": false
}
}
},
"blocking": true
}
],
"impactToken": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
};
const response = await fetch("https://api-prod.usefini.com/v2/test-suite/criteria-groups/00000000-0000-4000-8000-000000000003/public", {
method: "PATCH",
headers: {
Authorization: "Bearer fini_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify(body),
});
if (!response.ok) throw new Error(await response.text());
const result = await response.json();
import requests
import json
body = json.loads('''
{
"botId": "00000000-0000-4000-8000-000000000001",
"name": "Refund checks",
"criteria": [
{
"name": "No handoff",
"type": "deterministic",
"condition": {
"scope": "SCALAR",
"predicate": {
"left": {
"path": "escalated",
"dataType": "boolean"
},
"operator": "==",
"right": {
"value": false
}
}
},
"blocking": true
}
],
"impactToken": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
''')
response = requests.request(
"PATCH",
"https://api-prod.usefini.com/v2/test-suite/criteria-groups/00000000-0000-4000-8000-000000000003/public",
headers={"Authorization": "Bearer fini_your_api_key"},
json=body,
)
response.raise_for_status()
result = response.json()
{
"id": "00000000-0000-4000-8000-000000000003",
"companyId": "00000000-0000-4000-8000-000000000011",
"botId": "00000000-0000-4000-8000-000000000001",
"name": "Refund checks",
"criteria": [
{
"id": "00000000-0000-4000-8000-000000000012",
"companyId": "00000000-0000-4000-8000-000000000011",
"defaultCriterionId": null,
"name": "No handoff",
"type": "deterministic",
"condition": {
"scope": "SCALAR",
"predicate": {"left": {"path": "escalated", "dataType": "boolean"}, "operator": "==", "right": {"value": false}}
},
"blocking": true,
"judgePrompt": null,
"passPrompt": null,
"failPrompt": null,
"isActive": true,
"createdAt": "2026-10-12T10:00:00.000Z",
"updatedAt": "2026-10-12T10:00:00.000Z"
}
],
"revision": 2,
"createdAt": "2026-10-12T10:00:00.000Z",
"updatedAt": "2026-10-12T10:00:00.000Z",
"caseCount": 1,
"linkedCases": [{"id": "00000000-0000-4000-8000-000000000002", "name": "Refund policy", "sourceInteractionId": null}],
"impactToken": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
Test Suite
Update criteria group
Replace a group name and its shared criterion definitions.
PATCH
/
v2
/
test-suite
/
criteria-groups
/
{id}
/
public
curl --request PATCH \
--url 'https://api-prod.usefini.com/v2/test-suite/criteria-groups/00000000-0000-4000-8000-000000000003/public' \
--header 'Authorization: Bearer fini_your_api_key' \
--header 'Content-Type: application/json' \
--data '{
"botId": "00000000-0000-4000-8000-000000000001",
"name": "Refund checks",
"criteria": [
{
"name": "No handoff",
"type": "deterministic",
"condition": {
"scope": "SCALAR",
"predicate": {
"left": {
"path": "escalated",
"dataType": "boolean"
},
"operator": "==",
"right": {
"value": false
}
}
},
"blocking": true
}
],
"impactToken": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}'
const body = {
"botId": "00000000-0000-4000-8000-000000000001",
"name": "Refund checks",
"criteria": [
{
"name": "No handoff",
"type": "deterministic",
"condition": {
"scope": "SCALAR",
"predicate": {
"left": {
"path": "escalated",
"dataType": "boolean"
},
"operator": "==",
"right": {
"value": false
}
}
},
"blocking": true
}
],
"impactToken": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
};
const response = await fetch("https://api-prod.usefini.com/v2/test-suite/criteria-groups/00000000-0000-4000-8000-000000000003/public", {
method: "PATCH",
headers: {
Authorization: "Bearer fini_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify(body),
});
if (!response.ok) throw new Error(await response.text());
const result = await response.json();
import requests
import json
body = json.loads('''
{
"botId": "00000000-0000-4000-8000-000000000001",
"name": "Refund checks",
"criteria": [
{
"name": "No handoff",
"type": "deterministic",
"condition": {
"scope": "SCALAR",
"predicate": {
"left": {
"path": "escalated",
"dataType": "boolean"
},
"operator": "==",
"right": {
"value": false
}
}
},
"blocking": true
}
],
"impactToken": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
''')
response = requests.request(
"PATCH",
"https://api-prod.usefini.com/v2/test-suite/criteria-groups/00000000-0000-4000-8000-000000000003/public",
headers={"Authorization": "Bearer fini_your_api_key"},
json=body,
)
response.raise_for_status()
result = response.json()
{
"id": "00000000-0000-4000-8000-000000000003",
"companyId": "00000000-0000-4000-8000-000000000011",
"botId": "00000000-0000-4000-8000-000000000001",
"name": "Refund checks",
"criteria": [
{
"id": "00000000-0000-4000-8000-000000000012",
"companyId": "00000000-0000-4000-8000-000000000011",
"defaultCriterionId": null,
"name": "No handoff",
"type": "deterministic",
"condition": {
"scope": "SCALAR",
"predicate": {"left": {"path": "escalated", "dataType": "boolean"}, "operator": "==", "right": {"value": false}}
},
"blocking": true,
"judgePrompt": null,
"passPrompt": null,
"failPrompt": null,
"isActive": true,
"createdAt": "2026-10-12T10:00:00.000Z",
"updatedAt": "2026-10-12T10:00:00.000Z"
}
],
"revision": 2,
"createdAt": "2026-10-12T10:00:00.000Z",
"updatedAt": "2026-10-12T10:00:00.000Z",
"caseCount": 1,
"linkedCases": [{"id": "00000000-0000-4000-8000-000000000002", "name": "Refund policy", "sourceInteractionId": null}],
"impactToken": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
Replace a group name and its shared criterion definitions.
Fetch and review the group before saving. Replace the synthetic token below with the returned
impactToken. A stale token returns 409. Changes apply to all linked cases and may not raise any case above 50 total criteria.
Headers
Path parameters
Body parameters
One to 50 criterion definitions. See Criterion definitions.
Current 64-character lowercase hexadecimal token from Get criteria group. Reload the group after a
409 conflict.Response
Returns the updated group detail and refreshedimpactToken.
curl --request PATCH \
--url 'https://api-prod.usefini.com/v2/test-suite/criteria-groups/00000000-0000-4000-8000-000000000003/public' \
--header 'Authorization: Bearer fini_your_api_key' \
--header 'Content-Type: application/json' \
--data '{
"botId": "00000000-0000-4000-8000-000000000001",
"name": "Refund checks",
"criteria": [
{
"name": "No handoff",
"type": "deterministic",
"condition": {
"scope": "SCALAR",
"predicate": {
"left": {
"path": "escalated",
"dataType": "boolean"
},
"operator": "==",
"right": {
"value": false
}
}
},
"blocking": true
}
],
"impactToken": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}'
const body = {
"botId": "00000000-0000-4000-8000-000000000001",
"name": "Refund checks",
"criteria": [
{
"name": "No handoff",
"type": "deterministic",
"condition": {
"scope": "SCALAR",
"predicate": {
"left": {
"path": "escalated",
"dataType": "boolean"
},
"operator": "==",
"right": {
"value": false
}
}
},
"blocking": true
}
],
"impactToken": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
};
const response = await fetch("https://api-prod.usefini.com/v2/test-suite/criteria-groups/00000000-0000-4000-8000-000000000003/public", {
method: "PATCH",
headers: {
Authorization: "Bearer fini_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify(body),
});
if (!response.ok) throw new Error(await response.text());
const result = await response.json();
import requests
import json
body = json.loads('''
{
"botId": "00000000-0000-4000-8000-000000000001",
"name": "Refund checks",
"criteria": [
{
"name": "No handoff",
"type": "deterministic",
"condition": {
"scope": "SCALAR",
"predicate": {
"left": {
"path": "escalated",
"dataType": "boolean"
},
"operator": "==",
"right": {
"value": false
}
}
},
"blocking": true
}
],
"impactToken": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
''')
response = requests.request(
"PATCH",
"https://api-prod.usefini.com/v2/test-suite/criteria-groups/00000000-0000-4000-8000-000000000003/public",
headers={"Authorization": "Bearer fini_your_api_key"},
json=body,
)
response.raise_for_status()
result = response.json()
{
"id": "00000000-0000-4000-8000-000000000003",
"companyId": "00000000-0000-4000-8000-000000000011",
"botId": "00000000-0000-4000-8000-000000000001",
"name": "Refund checks",
"criteria": [
{
"id": "00000000-0000-4000-8000-000000000012",
"companyId": "00000000-0000-4000-8000-000000000011",
"defaultCriterionId": null,
"name": "No handoff",
"type": "deterministic",
"condition": {
"scope": "SCALAR",
"predicate": {"left": {"path": "escalated", "dataType": "boolean"}, "operator": "==", "right": {"value": false}}
},
"blocking": true,
"judgePrompt": null,
"passPrompt": null,
"failPrompt": null,
"isActive": true,
"createdAt": "2026-10-12T10:00:00.000Z",
"updatedAt": "2026-10-12T10:00:00.000Z"
}
],
"revision": 2,
"createdAt": "2026-10-12T10:00:00.000Z",
"updatedAt": "2026-10-12T10:00:00.000Z",
"caseCount": 1,
"linkedCases": [{"id": "00000000-0000-4000-8000-000000000002", "name": "Refund policy", "sourceInteractionId": null}],
"impactToken": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
Was this page helpful?

