> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.nunu.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Test Plan

> Delete a test plan.

<Info>
  **Permission Required**: `project:edit-tests`
</Info>

Permanently delete a test plan from your project. The tests referenced by the
plan are not affected — only the plan itself is removed.

## Path Parameters

<ParamField path="testPlanId" type="string" required>
  The test plan ID (UUID)
</ParamField>

## Response

<ResponseField name="id" type="string" required>
  ID of the deleted test plan (echoes the path param)
</ResponseField>

<ResponseField name="deleted" type="boolean" required>
  Always `true` on success
</ResponseField>

<RequestExample>
  ```bash cURL theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
  curl -X DELETE "https://nunu.ai/api/v1/project/your-project-id/test-plans/b3f1a2c4-5d6e-7f8a-9b0c-1d2e3f4a5b6c" \
    -H "X-Api-Key: YOUR_API_TOKEN"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
  { "id": "b3f1a2c4-5d6e-7f8a-9b0c-1d2e3f4a5b6c", "deleted": true }
  ```
</ResponseExample>


## OpenAPI

````yaml DELETE /project/{projectId}/test-plans/{testPlanId}
openapi: 3.1.0
info:
  title: nunu.ai API
  description: >-
    The nunu.ai Public API allows you to programmatically interact with your
    projects, manage test runs, and upload builds.
  version: 1.0.0
servers:
  - url: https://nunu.ai/api/v1
security:
  - apiKeyAuth: []
paths:
  /project/{projectId}/test-plans/{testPlanId}:
    parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
        description: >-
          The project ID. You can copy it from the project settings page or the
          project URL in the dashboard.
    delete:
      tags:
        - Test Plans
      summary: Delete Test Plan
      description: Delete a test plan.
      operationId: deleteTestPlan
      parameters:
        - name: testPlanId
          in: path
          required: true
          description: Test plan ID (UUID)
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Test plan deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden - missing project:edit-tests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Test plan not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    DeleteResponse:
      type: object
      description: >-
        Standard response for DELETE operations on tests, test plans, and shared
        steps.
      properties:
        id:
          type: string
          description: ID of the deleted resource (echoes the path param)
        deleted:
          type: boolean
          enum:
            - true
          description: Always true on success
      required:
        - id
        - deleted
    Error:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
        details:
          type: object
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key
      description: API key for authentication

````