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

# Create a test set

> Create a Test Suite regression set from existing conversation IDs.

Creates a test set from existing conversation IDs. Add criteria separately before starting a run.

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

## Body parameters

<ParamField body="name" type="string" required>
  Non-empty test set name.
</ParamField>

<ParamField body="description" type="string">
  Optional description.
</ParamField>

<ParamField body="conversationIds" type="string[]" required>
  One to 200 existing conversation IDs. Each value must be a UUID.
</ParamField>

## Response

Returns the created [TestSet object](/en/api-reference/test-sets#testset-object). New test sets return an empty `criteria` array until you attach criteria with [Add criteria](/en/api-reference/add-test-set-criteria).

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api-prod.usefini.com/v2/test-sets/public' \
    --header 'Authorization: Bearer fini_your_api_key' \
    --header 'Content-Type: application/json' \
    --data '{
      "name": "Refund regression set",
      "description": "Refund-policy conversations to re-check before prompt changes.",
      "conversationIds": [
        "a5221094-72d4-4b9c-8d30-2f785b108bd9",
        "2dd2b920-f57c-4e92-8a6a-f310d4c8594d"
      ]
    }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://api-prod.usefini.com/v2/test-sets/public', {
    method: 'POST',
    headers: {
      Authorization: 'Bearer fini_your_api_key',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      name: 'Refund regression set',
      description: 'Refund-policy conversations to re-check before prompt changes.',
      conversationIds: [
        'a5221094-72d4-4b9c-8d30-2f785b108bd9',
        '2dd2b920-f57c-4e92-8a6a-f310d4c8594d'
      ]
    })
  });

  const testSet = await response.json();
  ```

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

  response = requests.post(
      "https://api-prod.usefini.com/v2/test-sets/public",
      headers={
          "Authorization": "Bearer fini_your_api_key",
          "Content-Type": "application/json",
      },
      json={
          "name": "Refund regression set",
          "description": "Refund-policy conversations to re-check before prompt changes.",
          "conversationIds": [
              "a5221094-72d4-4b9c-8d30-2f785b108bd9",
              "2dd2b920-f57c-4e92-8a6a-f310d4c8594d",
          ],
      },
  )

  test_set = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "id": "4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3",
    "status": "success",
    "createdAt": "2026-07-28T08:55:32.000Z"
  }
  ```
</ResponseExample>
