---
title: "Undeletes multiple 'TestPlan' entities"
method: POST
path: "/testplan/bulk/undelete"
tags: ["TestPlan"]
---

# Undeletes multiple 'TestPlan' entities

`POST /testplan/bulk/undelete`

## Request

- Base URL: `https://app.testiny.io/api/v1`
- URL: `https://app.testiny.io/api/v1/testplan/bulk/undelete`
- Auth: API key in header `X-Api-Key`
- TypeScript: <https://skmtc.dev/testiny/apis/testiny-api/docs/testplan/bulk/undelete/post.ts> (a function with typed inputs; its response is checked against the schema)

Undeletes multiple existing 'TestPlan' entities (only if the entity type supports soft-deletion). Returns a full undeleted entity list including (optional) deletion metadata.

## Request body

- TestPlan[]
  - `id` integer: The unique entity id - must be a positive integer
  - `title` string: A descriptive title for this entity or mapping (1 to 200 characters)
  - `is_deleted` boolean: If the entity has been soft-deleted this value is true
  - `project_id` integer: The project id this entity or mapping belongs to
  - `created_at` string, date-time: The creation time for this entity or mapping value
  - `created_by` number: The creator user id of this entity or mapping value - or zero if created by the system
  - `modified_at` string, date-time: The last modification time for this entity or mapping value
  - `modified_by` number: The id of the user who last modified or undeleted this entity or mapping value - or zero if modified by the system
  - `deleted_at` string, date-time: The soft-deletion time for this entity or mapping value
  - `deleted_by` number: The id of the user who deleted this entity or mapping value - or zero if deleted by the system
  - `description` string: An optional description for this test plan (can be a rich text document, i.e. markdown with header line `<!--markdown-->` or Testiny JSON format)
  - `$testrun_count` number: The number of test runs linked to this test plan - read only
  - `$last_testrun_created` object: The time the last test run was created from this test plan - read only
  - `$open_testrun_count` number: The number of open test runs linked to this test plan - read only
  - `$query_count` number: The number of tset case queries linked to this test plan - read only

## Response `200`

Returns an array of TestPlan.

- TestPlan[]
  - `id` integer: The unique entity id - must be a positive integer
  - `title` string: A descriptive title for this entity or mapping (1 to 200 characters)
  - `is_deleted` boolean: If the entity has been soft-deleted this value is true
  - `project_id` integer: The project id this entity or mapping belongs to
  - `created_at` string, date-time: The creation time for this entity or mapping value
  - `created_by` number: The creator user id of this entity or mapping value - or zero if created by the system
  - `modified_at` string, date-time: The last modification time for this entity or mapping value
  - `modified_by` number: The id of the user who last modified or undeleted this entity or mapping value - or zero if modified by the system
  - `deleted_at` string, date-time: The soft-deletion time for this entity or mapping value
  - `deleted_by` number: The id of the user who deleted this entity or mapping value - or zero if deleted by the system
  - `description` string: An optional description for this test plan (can be a rich text document, i.e. markdown with header line `<!--markdown-->` or Testiny JSON format)
  - `$testrun_count` number: The number of test runs linked to this test plan - read only
  - `$last_testrun_created` object: The time the last test run was created from this test plan - read only
  - `$open_testrun_count` number: The number of open test runs linked to this test plan - read only
  - `$query_count` number: The number of tset case queries linked to this test plan - read only

## Other responses

- `4XX`: The request failed because invalid request parameters or data were supplied or access was denied.
- `5XX`: The request failed because an error occurred during processing of the request.

---

[API](https://skmtc.dev/testiny/apis/testiny-api.md) - [All operations](https://skmtc.dev/testiny/apis/testiny-api/llms.txt) - [OpenAPI document](https://skmtc.dev/testiny/apis/testiny-api/revisions/8f7643b2429d?raw)
