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

# Add conversations to criteria group

> Capture Inbox conversations and link existing cases in one batch.

Capture Inbox conversations and link existing cases in one batch.

Select between 1 and 50 conversations and cases combined. Captures are validated before the atomic write. With `requestId`, retries reuse deterministic case IDs for the same batch. Without it, an existing matching conversation case in the group is reused when available.

## 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="conversationIds" type="array" required>
  Unique Inbox conversation UUIDs, up to 50. Send an empty array when adding only existing cases.
</ParamField>

<ParamField body="caseIds" type="array">
  Unique existing case UUIDs, up to 50.
</ParamField>

<ParamField body="requestId" type="string">
  Optional UUID for stable retry deduplication. Reuse it only for the same batch.
</ParamField>

## Response

Returns the created or linked case UUIDs.

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

  ```javascript Node.js theme={null}
  const body = {
    "conversationIds": [
      "00000000-0000-4000-8000-000000000021"
    ],
    "requestId": "00000000-0000-4000-8000-000000000022"
  };

  const response = await fetch("https://api-prod.usefini.com/v2/test-suite/criteria-groups/00000000-0000-4000-8000-000000000003/conversations/public", {
    method: "POST",
    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('''
  {
    "conversationIds": [
      "00000000-0000-4000-8000-000000000021"
    ],
    "requestId": "00000000-0000-4000-8000-000000000022"
  }
  ''')

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

<ResponseExample>
  ```json 201 Created theme={null}
  {"caseIds": ["00000000-0000-4000-8000-000000000002"]}
  ```
</ResponseExample>


## Related topics

- [Overview](/en/api-reference/test-suite.md)
- [Add criteria groups to collection](/en/api-reference/add-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.