Skip to content
developers
Open TestCollab

Duplicate test case

POST/testcases/copy

Duplicates a specific test case

Use resource IDs from your own project. Keep the API token in your server or CI environment.

example.ts
import { createConfiguration, TestCasesApi } from '@testcollab/sdk';
const config = createConfiguration(process.env.TESTCOLLAB_TOKEN!);
const api = new TestCasesApi(config);
const result = await api.copyTestCase({
"testCaseCopyPayload": {
"testCase": 123,
"project": 123
}
});
console.log(result);
Field Type Required Description
testCase number Yes —
project number Yes —

200 — Action status details

Field Type Required Description
status boolean Yes —
created_id number Yes —
message string No —
Illustrative response
{
"status": true,
"created_id": 123,
"message": "example"
}
Status Meaning
403 Forbidden