Skip to content
Testsigma DOCS

Update a test case

PUT/projects/:project_id/test_cases/:test_case_id

Base URL  https://test-management.testsigma.com/api/v1

Update an existing test case within a specified project.

Authenticate with your API key as a Bearer token in the Authorization header. Generate a key →
project_idUnique identifier of the project to which the test case belongs.
test_case_idUnique identifier (or human-readable ID) of the test case to update.
titleThe title of the test case.
descriptionA detailed description of the test case.
template_typeThe type of template used for the test case (e.g., STEPS).
preconditionsPreconditions that must be met before executing the test case.
stepsThe steps to execute the test case.
expected_resultsThe expected results after executing the test case.
type_idThe ID representing the type of the test case.
status_idThe ID representing the current status of the test case.
automation_type_idThe ID for the automation type associated with the test case.
project_idThe ID of the project to which the test case belongs.
priority_idThe ID representing the priority of the test case.
owner_idThe ID of the user who owns the test case.
reviewer_idThe ID of the user who will review the test case.
folder_idThe ID of the folder where the test case is stored.
label_idsAn array of labels associated with the test case.
individual_stepsAn array of individual step objects for the test case.
individual_steps[].step_descriptionDescription of the individual step.
individual_steps[].expected_resultsExpected results for the individual step.
individual_steps[].orderThe order of the step in the test case.
individual_steps[].step_typeThe type of the individual step.
individual_steps[].step_group_idThe ID of the group this step belongs to, if applicable.
messageA message indicating the result of the operation; empty if successful.
data.test_case.idUnique identifier of the test case.
data.test_case.titleThe title of the test case.
data.test_case.descriptionThe description of the test case.
data.test_case.template_typeThe type of template used.
data.test_case.preconditionsPreconditions for the test case.
data.test_case.stepsSteps for the test case.
data.test_case.expected_resultsExpected results for the test case.
data.test_case.owner_idIdentifier of the owner.
data.test_case.type_idType identifier of the test case.
data.test_case.status_idCurrent status identifier.
data.test_case.automation_type_idAutomation type identifier.
data.test_case.priority_idPriority identifier.
data.test_case.reviewer_idReviewer identifier.
data.test_case.folder_idFolder identifier.
data.test_case.project_idProject identifier.
data.test_case.individual_stepsThe individual steps of the test case with their details.
data.test_case.created_atTimestamp of when the test case was created.
data.test_case.updated_atTimestamp of the last update to the test case.
REQUEST
curl -X PUT \
  'https://test-management.testsigma.com/api/v1/projects/:project_id/test_cases/:test_case_id' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "title": "Attempt to book a flight with missing required fields",
    "description": "Attempt to book a flight with missing required fields",
    "template_type": "STEPS",
    "preconditions": "User has selected a flight from the search results. User is on the booking page.",
    "steps": "Leave one or more required fields (e.g., First Name, Last Name, Email) blank. Click the 'Book Now' button.",
    "expected_results": "An error message is displayed indicating that the required fields are missing. The user is prompted to fill in the missing fields.",
    "type_id": "75a816d1-8909-47b5-b85b-fbf60a973587",
    "status_id": "bafd7f8d-832a-42ea-91df-9a1e5e02a2d9",
    "automation_type_id": "3cee45b5-4335-4564-bbdf-4ea9b0306ed3",
    "project_id": "c47ade67-0543-4582-a4a5-b7de447c94f5",
    "priority_id": "1d810f8f-7be0-41e4-9971-67ee1f55612e",
    "owner_id": "cbbc40a5-26e9-4b88-8c27-3626c9fbdaa4",
    "reviewer_id": "cbbc40a5-26e9-4b88-8c27-3626c9fbdaa4",
    "folder_id": "580e3972-7f4a-4748-87e6-9b74873e2b93",
    "label_ids": [
      "Flight_testcase"
    ],
    "individual_steps": [
      {
        "step_description": "Enter username updated",
        "expected_results": "Username is entered successfully",
        "order": 1,
        "step_type": "DEFAULT",
        "step_group_id": null
      },
      {
        "step_description": "Enter password updated",
        "expected_results": "Password is entered successfully",
        "order": 2,
        "step_type": "DEFAULT",
        "step_group_id": null
      },
      {
        "step_description": "Click login",
        "expected_results": "User is redirected to the dashboard",
        "order": 3,
        "step_type": "DEFAULT",
        "step_group_id": null
      }
    ]
  }'
const response = await fetch('https://test-management.testsigma.com/api/v1/projects/:project_id/test_cases/:test_case_id', {
  method: 'PUT',
  headers: {
    'Authorization': 'Bearer <API_KEY>',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
      "title": "Attempt to book a flight with missing required fields",
      "description": "Attempt to book a flight with missing required fields",
      "template_type": "STEPS",
      "preconditions": "User has selected a flight from the search results. User is on the booking page.",
      "steps": "Leave one or more required fields (e.g., First Name, Last Name, Email) blank. Click the 'Book Now' button.",
      "expected_results": "An error message is displayed indicating that the required fields are missing. The user is prompted to fill in the missing fields.",
      "type_id": "75a816d1-8909-47b5-b85b-fbf60a973587",
      "status_id": "bafd7f8d-832a-42ea-91df-9a1e5e02a2d9",
      "automation_type_id": "3cee45b5-4335-4564-bbdf-4ea9b0306ed3",
      "project_id": "c47ade67-0543-4582-a4a5-b7de447c94f5",
      "priority_id": "1d810f8f-7be0-41e4-9971-67ee1f55612e",
      "owner_id": "cbbc40a5-26e9-4b88-8c27-3626c9fbdaa4",
      "reviewer_id": "cbbc40a5-26e9-4b88-8c27-3626c9fbdaa4",
      "folder_id": "580e3972-7f4a-4748-87e6-9b74873e2b93",
      "label_ids": [
          "Flight_testcase"
      ],
      "individual_steps": [
          {
              "step_description": "Enter username updated",
              "expected_results": "Username is entered successfully",
              "order": 1,
              "step_type": "DEFAULT",
              "step_group_id": null
          },
          {
              "step_description": "Enter password updated",
              "expected_results": "Password is entered successfully",
              "order": 2,
              "step_type": "DEFAULT",
              "step_group_id": null
          },
          {
              "step_description": "Click login",
              "expected_results": "User is redirected to the dashboard",
              "order": 3,
              "step_type": "DEFAULT",
              "step_group_id": null
          }
      ]
  })
});
const data = await response.json();
import requests

response = requests.put(
  'https://test-management.testsigma.com/api/v1/projects/:project_id/test_cases/:test_case_id',
  headers={
    'Authorization': 'Bearer <API_KEY>',
    'Content-Type': 'application/json'
  },
  json={
      "title": "Attempt to book a flight with missing required fields",
      "description": "Attempt to book a flight with missing required fields",
      "template_type": "STEPS",
      "preconditions": "User has selected a flight from the search results. User is on the booking page.",
      "steps": "Leave one or more required fields (e.g., First Name, Last Name, Email) blank. Click the 'Book Now' button.",
      "expected_results": "An error message is displayed indicating that the required fields are missing. The user is prompted to fill in the missing fields.",
      "type_id": "75a816d1-8909-47b5-b85b-fbf60a973587",
      "status_id": "bafd7f8d-832a-42ea-91df-9a1e5e02a2d9",
      "automation_type_id": "3cee45b5-4335-4564-bbdf-4ea9b0306ed3",
      "project_id": "c47ade67-0543-4582-a4a5-b7de447c94f5",
      "priority_id": "1d810f8f-7be0-41e4-9971-67ee1f55612e",
      "owner_id": "cbbc40a5-26e9-4b88-8c27-3626c9fbdaa4",
      "reviewer_id": "cbbc40a5-26e9-4b88-8c27-3626c9fbdaa4",
      "folder_id": "580e3972-7f4a-4748-87e6-9b74873e2b93",
      "label_ids": [
          "Flight_testcase"
      ],
      "individual_steps": [
          {
              "step_description": "Enter username updated",
              "expected_results": "Username is entered successfully",
              "order": 1,
              "step_type": "DEFAULT",
              "step_group_id": null
          },
          {
              "step_description": "Enter password updated",
              "expected_results": "Password is entered successfully",
              "order": 2,
              "step_type": "DEFAULT",
              "step_group_id": null
          },
          {
              "step_description": "Click login",
              "expected_results": "User is redirected to the dashboard",
              "order": 3,
              "step_type": "DEFAULT",
              "step_group_id": null
          }
      ]
  }
)
data = response.json()
RESPONSE200OK
{
  "message": "",
  "data": {
    "test_case": {
      "id": "9c09349f-5c16-4d29-9f8e-194576b6b841",
      "title": "Attempt to book a flight with missing required fields",
      "description": "Attempt to book a flight with missing required fields",
      "template_type": "STEPS",
      "preconditions": "User has selected a flight from the search results. User is on the booking page.",
      "steps": "Leave one or more required fields (e.g., First Name, Last Name, Email) blank. Click the 'Book Now' button.",
      "expected_results": "An error message is displayed indicating that the required fields are missing. The user is prompted to fill in the missing fields.",
      "owner_id": "cbbc40a5-26e9-4b88-8c27-3626c9fbdaa4",
      "type_id": "75a816d1-8909-47b5-b85b-fbf60a973587",
      "status_id": "bafd7f8d-832a-42ea-91df-9a1e5e02a2d9",
      "automation_type_id": "3cee45b5-4335-4564-bbdf-4ea9b0306ed3",
      "priority_id": "1d810f8f-7be0-41e4-9971-67ee1f55612e",
      "reviewer_id": "cbbc40a5-26e9-4b88-8c27-3626c9fbdaa4",
      "folder_id": "580e3972-7f4a-4748-87e6-9b74873e2b93",
      "project_id": "c47ade67-0543-4582-a4a5-b7de447c94f5",
      "individual_steps": [
        {
          "id": "a1f2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
          "step_description": "Enter username updated",
          "expected_results": "Username is entered successfully",
          "order": 1,
          "step_type": "DEFAULT",
          "step_group_id": null
        },
        {
          "id": "b2e3d4c5-6f7a-4b8c-9d0e-1f2a3b4c5d6e",
          "step_description": "Enter password updated",
          "expected_results": "Password is entered successfully",
          "order": 2,
          "step_type": "DEFAULT",
          "step_group_id": null
        },
        {
          "id": "c3f4e5d6-7a8b-4c9d-0e1f-2a3b4c5d6e7f",
          "step_description": "Click login",
          "expected_results": "User is redirected to the dashboard",
          "order": 3,
          "step_type": "DEFAULT",
          "step_group_id": null
        }
      ],
      "created_at": 1710675200,
      "updated_at": 1710682400
    }
  }
}