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

# Cancel workflow run

> Requests cancellation of a currently active workflow run. This is an asynchronous operation and the run may take some time to fully stop.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/samplehc/openapi.documented.yml put /api/v2/workflow-runs/{workflowRunId}/cancel
openapi: 3.0.3
info:
  title: Sample Healthcare API
  description: API for Sample Healthcare
  version: 1.0.0
servers: []
security: []
paths:
  /api/v2/workflow-runs/{workflowRunId}/cancel:
    put:
      tags:
        - Workflow-run
      summary: Cancel workflow run
      description: >-
        Requests cancellation of a currently active workflow run. This is an
        asynchronous operation and the run may take some time to fully stop.
      parameters:
        - schema:
            type: string
          in: path
          name: workflowRunId
          required: true
          description: The unique identifier of the workflow run to be cancelled.
      responses:
        '200':
          description: Workflow run cancellation request accepted.
          content:
            application/json:
              schema:
                type: object
                properties: {}
                additionalProperties: false
        '400':
          description: Bad request, e.g., the workflowRunId was not in a valid format.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '404':
          description: >-
            Not Found, the workflow run with the specified ID does not exist or
            is not in a cancellable state (already completed/failed/cancelled).
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '500':
          description: >-
            Internal server error encountered while attempting to cancel the
            workflow run.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false

````