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

# Discard pentest draft

> Delete a pentest that hasn't started.

Deletes a draft pentest and its saved login details. To end a pentest that has already started, use [Stop scan](https://docs.hacktron.ai/api-reference/scans/stop-scan.md).

> [!NOTE]
>
> **Scope required**: `write`. **Role**: member or above.


## OpenAPI

````yaml DELETE /pentests/{id}
openapi: 3.0.0
info:
  title: Hacktron REST API
  description: Public REST API for programmatic access to Hacktron
  version: '1.0'
  contact: {}
servers:
  - url: https://api.hacktron.ai/v1
security:
  - api-key: []
tags: []
paths:
  /pentests/{id}:
    delete:
      tags:
        - REST API - Pentests
      summary: Discard a pentest that has not started
      operationId: RestPentestController_discard
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestDiscardPentestResponseDto'
components:
  schemas:
    RestDiscardPentestResponseDto:
      type: object
      properties:
        scan_id:
          type: string
          format: uuid
        discarded:
          type: boolean
      required:
        - scan_id
        - discarded
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: X-Api-Key

````

## Related topics

- [Create pentest draft](https://docs.hacktron.ai/api-reference/pentests/create-pentest.md)
- [Get Started](https://docs.hacktron.ai/mcp/get-started.md)
- [Update pentest draft](https://docs.hacktron.ai/api-reference/pentests/update-pentest.md)
- [Hacktron in Slack](https://docs.hacktron.ai/platform/slack-assistant.md)
- [Estimate pentest](https://docs.hacktron.ai/api-reference/pentests/estimate-pentest.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.