Skip to main content
Test CasesUpdate Test Case
TestMu AI
StatusCommunityBlog
Test Cases

Update Test Case

Update a test case including its steps, metadata, and dynamic fields. This endpoint replaces the separate Test Steps APIs (POST /api/v1/test-steps and PUT /api/v1/test-steps/{test_step_id}). The snapshot_id from the GET response must be included in the request body.

PUT
/api/v2/test-cases
Update Test Case
curl --request PUT \
--url "https://test-manager-api.lambdatest.com//api/v2/test-cases" \
--header "Authorization: Basic <encoded-value>" \
--header "Content-Type: application/json" \
--data '{
"id": "<id>",
"project_id": "<project_id>",
"title": "<title>",
"description": "<description>",
"type": "<type>",
"preconditions": "<preconditions>",
"status": "<status>",
"priority": "<priority>",
"automation_status": "<automation_status>",
"external_id": "<external_id>",
"attachments": [],
"dynamic_fields": [],
"tags": [],
"commit_message": "<commit_message>",
"snapshot_id": "<snapshot_id>",
"step_events": [],
"override": true
}'
{
"message": "Test case updated successfully",
"type": "Success",
"data": {
"snapshot_id": "sample_snapshot_id"
}
}

Authorizations

Authorizationstringheaderrequired

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json
idstringrequired

The test case ID to update.

project_idstringrequired

The project ID the test case belongs to.

titlestring
descriptionstring
typestring
preconditionsstring
statusstring
prioritystring
automation_statusstring
external_idstring
attachmentsarray
dynamic_fieldsarray
tagsarray
commit_messagestringrequired
snapshot_idstringrequired

Required. Must be taken from the GET /api/v2/test-cases/{test_case_id} response.

step_eventsarray
overrideboolean

Response

application/json

OK

messagestring
Example: "Test case updated successfully"
typestring
Example: "Success"
dataobject
data.snapshot_idstring
Example: "sample_snapshot_id"
Update Test Case
curl --request PUT \
--url "https://test-manager-api.lambdatest.com//api/v2/test-cases" \
--header "Authorization: Basic <encoded-value>" \
--header "Content-Type: application/json" \
--data '{
"id": "<id>",
"project_id": "<project_id>",
"title": "<title>",
"description": "<description>",
"type": "<type>",
"preconditions": "<preconditions>",
"status": "<status>",
"priority": "<priority>",
"automation_status": "<automation_status>",
"external_id": "<external_id>",
"attachments": [],
"dynamic_fields": [],
"tags": [],
"commit_message": "<commit_message>",
"snapshot_id": "<snapshot_id>",
"step_events": [],
"override": true
}'
{
"message": "Test case updated successfully",
"type": "Success",
"data": {
"snapshot_id": "sample_snapshot_id"
}
}