> ## 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.

# Remove cases from criteria group

> Detach cases from a group using a reviewed impact token.

Detach cases from a group using a reviewed impact token.

Replace the synthetic token with the latest group `impactToken`. Send the JSON body with the DELETE request. Cases are retained; only this group link is removed. A stale token returns `409`.

## Headers

<ParamField header="Authorization" type="string" required>
  Bearer token containing your workspace API key. The key needs `write` scope.
</ParamField>

## Path parameters

<ParamField path="id" type="string" required>
  Criteria-group UUID.
</ParamField>

## Body parameters

<ParamField body="caseIds" type="array" required>
  Unique case UUIDs, up to 200. Each case must belong to this agent.
</ParamField>

<ParamField body="impactToken" type="string" required>
  Current 64-character lowercase hexadecimal token from [Get criteria group](/en/api-reference/get-test-suite-criteria-group). Reload the group after a `409` conflict.
</ParamField>

## Response

Returns the updated group detail. The example intentionally has an empty array of linked cases after removing the last member.

<RequestExample>
  ```bash cURL theme={null}
  curl --request DELETE \
    --url 'https://api-prod.usefini.com/v2/test-suite/criteria-groups/00000000-0000-4000-8000-000000000003/cases/public' \
    --header 'Authorization: Bearer fini_your_api_key' \
    --header 'Content-Type: application/json' \
    --data '{
    "caseIds": [
      "00000000-0000-4000-8000-000000000002"
    ],
    "impactToken": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
  }'
  ```

  ```javascript Node.js theme={null}
  const body = {
    "caseIds": [
      "00000000-0000-4000-8000-000000000002"
    ],
    "impactToken": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
  };

  const response = await fetch("https://api-prod.usefini.com/v2/test-suite/criteria-groups/00000000-0000-4000-8000-000000000003/cases/public", {
    method: "DELETE",
    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();
  ```

  ```python Python theme={null}
  import requests
  import json

  body = json.loads('''
  {
    "caseIds": [
      "00000000-0000-4000-8000-000000000002"
    ],
    "impactToken": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
  }
  ''')

  response = requests.request(
      "DELETE",
      "https://api-prod.usefini.com/v2/test-suite/criteria-groups/00000000-0000-4000-8000-000000000003/cases/public",
      headers={"Authorization": "Bearer fini_your_api_key"},
      json=body,
  )
  response.raise_for_status()
  result = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "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": 1,
    "createdAt": "2026-10-12T10:00:00.000Z",
    "updatedAt": "2026-10-12T10:00:00.000Z",
    "caseCount": 0,
    "linkedCases": [],
    "impactToken": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
  }
  ```
</ResponseExample>


## Related topics

- [Overview](/en/api-reference/test-suite.md)
- [Remove criteria groups from collection](/en/api-reference/remove-test-suite-collection-groups.md)
- [Add cases to criteria group](/en/api-reference/add-test-suite-group-cases.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.