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

# Cancel runs

> Stops test runs that have not finished, including queued runs, which are then no longer scheduled. The response names the runs it stopped, the ones that had already finished, and any IDs it could not find.



## OpenAPI

````yaml /specs-prettified/realtime/openapi.stable.json post /v1/stable/test-run/cancel
openapi: 3.0.0
info:
  title: Realtime
  description: Realtime gateway API service
  version: 1.0.0
  contact: {}
servers:
  - url: https://realtime-api.voiceflow.com
security: []
tags: []
paths:
  /v1/stable/test-run/cancel:
    post:
      tags:
        - Test Run
      summary: Cancel runs
      description: Stops test runs that have not finished, including queued runs,
        which are then no longer scheduled. The response names the runs it
        stopped, the ones that had already finished, and any IDs it could not
        find.
      operationId: StableTestRunController_cancel
      parameters:
        - name: projectID
          required: true
          in: query
          schema:
            type: string
            description: The ID of the project to operate on.
        - name: environmentAlias
          required: true
          in: query
          schema:
            type: string
            description: The alias of the environment to operate on (e.g. `main`).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/StableTestRunCancelRequest"
      responses:
        "200":
          description: Returns `canceledRunIDs` for the runs this call stopped,
            `finishedRuns` with the status of runs that had already finished,
            and `notFoundRunIDs` for IDs with no run in this environment.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StableTestRunCancelResponse"
          x-vf-doc:
            description: Returns `canceledRunIDs` for the runs this call stopped,
              `finishedRuns` with the status of runs that had already finished,
              and `notFoundRunIDs` for IDs with no run in this environment.
      security:
        - token: []
components:
  schemas:
    StableTestRunCancelRequest:
      type: object
      properties:
        runIDs:
          minItems: 1
          maxItems: 50
          type: array
          items:
            type: string
          description: The IDs of the runs to cancel.
      required:
        - runIDs
      additionalProperties: false
    StableTestRunCancelResponse:
      type: object
      properties:
        canceledRunIDs:
          type: array
          items:
            type: string
          description: The runs this call canceled. A run that had not started yet will
            never start.
        finishedRuns:
          type: array
          items:
            $ref: "#/components/schemas/StableTestRunCancelFinishedRun"
          description: Runs that had already finished, so the call left them as they were.
        notFoundRunIDs:
          type: array
          items:
            type: string
          description: IDs with no run in this environment.
      required:
        - canceledRunIDs
        - finishedRuns
        - notFoundRunIDs
    StableTestRunCancelFinishedRun:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
          enum:
            - idle
            - pending
            - running
            - failed
            - passed
            - canceled
          description: The status the run kept.
          x-enumNames:
            - IDLE
            - PENDING
            - RUNNING
            - FAILED
            - PASSED
            - CANCELED
      required:
        - id
        - status
  securitySchemes:
    token:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Voiceflow bearer token
````
