> ## 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.

# Stop scan

> Stop a running scan or pentest.

Stops a running scan and returns its status. Members can stop their own pentests and any PR scan. Organization admins can stop any scan.

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


## OpenAPI

````yaml POST /scans/{id}/stop
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:
  /scans/{id}/stop:
    post:
      tags:
        - REST API - Scans
      summary: >-
        Stop a running scan. Members can stop pentests they started and any PR
        scan; admins can stop any scan.
      operationId: RestScanController_stop
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestScanStatusResponseDto'
components:
  schemas:
    RestScanStatusResponseDto:
      type: object
      properties:
        id:
          type: string
        task_id:
          type: string
        status:
          type: string
          enum:
            - pending
            - running
            - completed
            - failed
            - stopped
            - cancelled
            - skipped
            - pending_verification
            - pending_triage
            - draft
            - estimating
            - estimated
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - task_id
        - status
        - created_at
        - updated_at
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: X-Api-Key

````

## Related topics

- [Get Started](https://docs.hacktron.ai/mcp/get-started.md)
- [Start pentest](https://docs.hacktron.ai/api-reference/pentests/start-pentest.md)
- [Discard pentest draft](https://docs.hacktron.ai/api-reference/pentests/discard-pentest.md)
- [Changelog](https://docs.hacktron.ai/changelog.md)
- [Get scan status](https://docs.hacktron.ai/api-reference/scans/get-scan-status.md)


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