Skip to main content
Experience faster, smarter testing with BrowserStack AI Agents. See what your workflowโ€™s been missing. Explore now!
No Result Found
Connect & Get help from fellow developers on our Discord community. Ask the CommunityAsk the Community

Sub test plan API endpoints

API reference for managing sub test plans in BrowserStack Test Management, including creating, updating, retrieving, and deleting sub test plans under a test plan.

Use these endpoints to manage sub test plans within a test plan. You can create, update, retrieve, and delete sub test plans for a project, enabling granular test management and reporting.

List all sub test plans

GET /api/v2/projects/{project_id}/test-plans/{test_plan_id}/sub-test-plans

This endpoint retrieves all sub test plans for a given test plan in a project. Use it to get an overview of all sub test plans and their details.

This list is paginated; for more information about request and response pagination in the Test Management API, see pagination in the Test Management API.

Request Parameters

Request

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
https://api.browserstack.com/api/v2/projects/{project_id}/test-plans/{test_plan_id}/sub-test-plans
  • project_id* string

    Unique identifier for the project.

  • test_plan_id* string

    Unique identifier for the test plan.

Response attributes 200 application/json

Response

{
  "success": true,
  "sub_test_plans": [
    {
      "active_state": "active",
      "description": "Sample Description",
      "identifier": "STP-194",
      "test_runs_count": { "active": 0, "closed": 0 },
      "tags": [],
      "name": "Sub Test Plan - 26/12/2025",
      "issues": [],
      "project_id": "PR-90177",
      "parent_plan_id": "TP-2553",
      "start_date": null,
      "end_date": null,
      "created_at": "2025-12-26T07:28:18.000Z"
    }
  ],
  "info": {
    "page": 1,
    "page_size": 30,
    "count": 2,
    "prev": null,
    "next": null
  }
}
  • success Boolean

    Indicates if the request was successful.

  • sub_test_plans Array

    List of sub test plans.

    โ–ถ SHOW VALUES
    • active_state String

      State of the sub test plan (e.g., active).

    • description String

      Description of the sub test plan.

    • identifier String

      Unique identifier of the sub test plan.

    • test_runs_count Object

      Count of active and closed test runs in the sub test plan.

      โ–ถ SHOW VALUES
      • active Integer

        Number of active test runs.

      • closed Integer

        Number of closed test runs.

    • tags Array

      List of tags associated with the sub test plan.

    • name String

      Name of the sub test plan.

    • issues Array

      List of issue identifiers linked to the sub test plan.

    • project_id String

      Unique identifier of the project.

    • parent_plan_id String

      Unique identifier of the parent test plan.

    • start_date String

      Start date of the sub test plan (ISO 8601 format or null).

    • end_date String

      End date of the sub test plan (ISO 8601 format or null).

    • created_at String

      Timestamp when the sub test plan was created.

  • info Object

    Pagination information.

    โ–ถ SHOW VALUES
    • page Integer

      Current page number.

    • page_size Integer

      Number of items per page.

    • count Integer

      Total number of items.

    • prev String

      Previous page link if available.

    • next String

      Next page link if available.

Get a sub test plan

GET /api/v2/projects/{project_id}/test-plans/{test_plan_id}/sub-test-plans/{sub_test_plan_id}

This endpoint retrieves details of a specific sub test plan by its ID.

Request Parameters

Request

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
https://api.browserstack.com/api/v2/projects/{project_id}/test-plans/{test_plan_id}/sub-test-plans/{sub_test_plan_id}
  • project_id* string

    Unique identifier of the project.

  • test_plan_id* string

    Unique identifier of the test plan.

  • sub_test_plan_id* string

    Unique identifier for the sub test plan.

Response attributes 200 application/json

Response

{
  "success": true,
  "sub_test_plan": {
    "active_state": "active",
    "description": "Sample Description",
    "identifier": "STP-194",
    "test_runs_count": { "active": 0, "closed": 0 },
    "tags": [],
    "test_runs": [],
    "links": {
      "self": "/api/v1/projects/2784593/test-plans/94276",
      "test_runs": "/api/v2/projects/PR-90177/test-plans/STP-194/test-runs"
    },
    "name": "Sub Test Plan - 26/12/2025",
    "issues": null,
    "project_id": "PR-90177",
    "parent_plan_id": "TP-2553",
    "start_date": null,
    "end_date": null,
    "created_at": "2025-12-26T07:28:18.000Z"
  }
}
  • success Boolean

    Indicates if the request was successful.

  • sub_test_plan Object

    Sub test plan details.

    โ–ถ SHOW VALUES
    • active_state String

      State of the sub test plan (e.g., active).

    • description String

      Description of the sub test plan.

    • identifier String

      Unique identifier of the sub test plan.

    • test_runs_count Object

      Count of active and closed test runs in the sub test plan.

      โ–ถ SHOW VALUES
      • active Integer

        Number of active test runs.

      • closed Integer

        Number of closed test runs.

    • tags Array

      List of tags associated with the sub test plan.

    • test_runs Array

      List of test runs in the sub test plan (only in details API).

    • links Object

      Related API links for the sub test plan (only in details API).

      โ–ถ SHOW VALUES
      • self String

        API endpoint URL for the sub test plan itself.

      • test_runs String

        API endpoint URL for the test runs in the sub test plan.

    • name String

      Name of the sub test plan.

    • issues Array

      List of issue identifiers linked to the sub test plan.

    • project_id String

      Unique identifier of the project.

    • parent_plan_id String

      Unique identifier of the parent test plan.

    • start_date String

      Start date of the sub test plan (ISO 8601 format or null).

    • end_date String

      End date of the sub test plan (ISO 8601 format or null).

    • created_at String

      Timestamp when the sub test plan was created.

Create a sub test plan

POST /api/v2/projects/{project_id}/test-plans/{test_plan_id}/sub-test-plans

This endpoint creates a new sub test plan under a test plan.

Request parameters

Request

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST https://api.browserstack.com/api/v2/projects/{project_id}/test-plans/{test_plan_id}/sub-test-plans
  • project_id* string

    Unique identifier of the project.

  • test_plan_id* string

    Unique identifier of the test plan.

Request Body

Request Body

{
  "sub_test_plan": {
    "name": "Sprint 1 Testing",
    "description": "Smoke and regression testing for sprint 1 features",
    "start_date": "2024-02-01",
    "end_date": "2024-02-15",
    "tags": [
      "sprint",
      "regression"
    ]
  }
}
  • name* String

    Name of the sub test plan.

  • description String

    Description of the sub test plan.

  • start_date String

    Start date of the sub test plan (YYYY-MM-DD).

  • end_date String

    End date of the sub test plan (YYYY-MM-DD).

  • tags Array

    List of tags for the sub test plan.

Response attributes 200 application/json

Response

{
  "success": true,
  "sub_test_plan": {
    "active_state": "active",
    "description": "Smoke and regression testing for sprint 1 features",
    "identifier": "STP-195",
    "test_runs_count": {
      "active": 0,
      "closed": 0
    },
    "tags": [
      "regression",
      "sprint"
    ],
    "name": "Sprint 1 Testing",
    "issues": [
      "xyz-001",
      "abc-002"
    ],
    "project_id": "PR-90177",
    "parent_plan_id": "TP-2553",
    "sub_plans_count": 0,
    "start_date": "2024-02-01T00:00:00.000Z",
    "end_date": "2024-02-15T00:00:00.000Z",
    "created_at": "2025-12-26T07:47:24.000Z"
  }
}
  • success Boolean

    Indicates if the request was successful.

  • sub_test_plan Object

    Sub test plan details

    โ–ถ SHOW VALUES
    • active_state String

      State of the sub test plan (e.g., active).

    • description String

      Description of the sub test plan.

    • identifier String

      Unique identifier of the sub test plan.

    • test_runs_count Object

      Count of active and closed test runs in the sub test plan.

      โ–ถ SHOW VALUES
      • active Integer

        Number of active test runs.

      • closed Integer

        Number of closed test runs.

    • tags Array

      List of tags associated with the sub test plan.

    • name String

      Name of the sub test plan.

    • issues Array

      List of issue identifiers linked to the sub test plan.

    • project_id String

      Unique identifier of the project.

    • parent_plan_id String

      Unique identifier of the parent test plan.

    • sub_plans_count Integer

      Number of sub plans (only in create/update response).

    • start_date String

      Start date of the sub test plan (ISO 8601 format or null).

    • end_date String

      End date of the sub test plan (ISO 8601 format or null).

    • created_at String

      Timestamp when the sub test plan was created.

Update a sub test plan

PATCH /api/v2/projects/{project_id}/test-plans/{test_plan_id}/sub-test-plans/{sub_test_plan_id}

This endpoint updates an existing sub test plan.

Request parameters

Request

curl  -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X PATCH https://api.browserstack.com/api/v2/projects/{project_id}/test-plans/{test_plan_id}/sub-test-plans/{sub_test_plan_id} \
  • project_id* string

    Unique identifier for the project.

  • test_plan_id* string

    Unique identifier for the test plan.

  • sub_test_plan_id* string

    Unique identifier for the sub test plan.

Request body

Request Body

{
  "sub_test_plan": {
    "name": "Sprint 1 - Extended Testing",
    "description": "Regression + UAT scope",
    "start_date": "2024-02-01",
    "end_date": "2024-02-20",
    "plan_status": "active"
  }
}
  • name* String

    Name of the sub test plan.

  • description String

    Description of the sub test plan.

  • start_date String

    Start date of the sub test plan (YYYY-MM-DD).

  • end_date String

    End date of the sub test plan (YYYY-MM-DD).

  • plan_status String

    Status of the sub test plan (e.g., active).

Response attributes 200 application/json

Response

{
  "success": true,
  "sub_test_plan": {
    "active_state": "active",
    "description": "Smoke and regression testing for sprint 1 features",
    "identifier": "STP-195",
    "test_runs_count": {
      "active": 0,
      "closed": 0
    },
    "tags": [
      "regression",
      "sprint"
    ],
    "name": "Sprint 1 Testing",
    "issues": [
      "xyz-001",
      "abc-002"
    ],
    "project_id": "PR-90177",
    "parent_plan_id": "TP-2553",
    "sub_plans_count": 0,
    "start_date": "2024-02-01T00:00:00.000Z",
    "end_date": "2024-02-15T00:00:00.000Z",
    "created_at": "2025-12-26T07:47:24.000Z"
  }
}
  • success Boolean

    Indicates if the request was successful.

  • sub_test_plan Object

    Updated sub test plan details.

    โ–ถ SHOW VALUES
    • active_state String

      State of the sub test plan (e.g., active).

    • description String

      Description of the sub test plan.

    • identifier String

      Unique identifier of the sub test plan.

    • test_runs_count Object

      Count of active and closed test runs in the sub test plan.

      โ–ถ SHOW VALUES
      • active Integer

        Number of active test runs.

      • closed Integer

        Number of closed test runs.

    • tags Array

      List of tags associated with the sub test plan.

    • name String

      Name of the sub test plan.

    • issues Array

      List of issue identifiers linked to the sub test plan.

    • project_id String

      Unique identifier of the project.

    • parent_plan_id String

      Unique identifier of the parent test plan.

    • sub_plans_count Integer

      Number of sub plans (only in create/update response).

    • start_date String

      Start date of the sub test plan (ISO 8601 format or null).

    • end_date String

      End date of the sub test plan (ISO 8601 format or null).

    • created_at String

      Timestamp when the sub test plan was created.

Delete a sub test plan

DELETE /api/v2/projects/{project_id}/test-plans/{test_plan_id}/sub-test-plans/{sub_test_plan_id}

This endpoint deletes a sub test plan by its ID.

Request Parameters

Request

curl -X DELETE \
  'https://api.browserstack.com/api/v2/projects/{project_id}/test-plans/{test_plan_id}/sub-test-plans/{sub_test_plan_id}' \ 
  -u "YOUR_USERNAME:YOUR_ACCESS_KEY"
  • project_id* string

    Unique identifier of the project.

  • test_plan_id* string

    Unique identifier of the test plan.

  • sub_test_plan_id* string

    Unique identifier for the sub test plan.

Response attributes 200 application/json

Response

{
  "success": true,
  "message": "Sub Test Plan STP-201 deleted successfully."
}
  • success Boolean

    Indicates if the request was successful.

  • message String

    Deletion status message.

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Download Copy Check Circle