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

# Cancel Run

> Cancels a running workflow. Any nodes that have already completed will retain their outputs, but pending nodes will be cancelled.

**Rate Limit:** 30 requests per minute per API key.



## OpenAPI

````yaml POST /{key}/runs/{runId}/kill
openapi: 3.1.0
info:
  title: Cordage Webhook API
  description: >-
    The Cordage Webhook API allows you to programmatically trigger workflows,
    monitor run status, and retrieve outputs. Use webhooks to integrate your AI
    workflows into external applications, automation pipelines, or custom tools.
  version: 1.0.0
  contact:
    name: Cordage Support
    url: https://trycordage.com
servers:
  - url: https://api.trycordage.com/api/webhooks
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: Workflows
    description: Trigger and manage workflow executions
  - name: Runs
    description: Monitor and control workflow runs
paths:
  /{key}/runs/{runId}/kill:
    post:
      tags:
        - Runs
      summary: Cancel a run
      description: >-
        Cancels a running workflow. Any nodes that have already completed will
        retain their outputs, but pending nodes will be cancelled.


        **Rate Limit:** 30 requests per minute per API key.
      operationId: killRun
      parameters:
        - name: key
          in: path
          description: The webhook key
          required: true
          schema:
            type: string
            example: wh_abc123xyz
        - name: runId
          in: path
          description: The run ID to cancel
          required: true
          schema:
            type: string
            format: uuid
            example: 550e8400-e29b-41d4-a716-446655440000
      responses:
        '200':
          description: Run cancelled successfully
          headers:
            X-RateLimit-Limit:
              description: Maximum requests allowed per window
              schema:
                type: integer
                example: 30
            X-RateLimit-Remaining:
              description: Remaining requests in current window
              schema:
                type: integer
                example: 29
            X-RateLimit-Reset:
              description: Seconds until rate limit resets
              schema:
                type: integer
                example: 45
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KillResponse'
              example:
                run_id: 550e8400-e29b-41d4-a716-446655440000
                status: cancelled
                message: Workflow cancelled
        '400':
          description: Bad request - run is already completed or cancelled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Run is already completed
        '401':
          description: Unauthorized - missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden - API key doesn't have access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Webhook or run not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    KillResponse:
      type: object
      required:
        - run_id
        - status
        - message
      properties:
        run_id:
          type: string
          format: uuid
          description: The cancelled run's ID
        status:
          type: string
          enum:
            - cancelled
          description: Always 'cancelled' for a successful kill
        message:
          type: string
          description: Human-readable status message
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message
        retry_after:
          type: integer
          description: Seconds to wait before retrying (only present for rate limit errors)
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |-
        API key authentication. Get your API key from the workspace settings.

        Example: `Authorization: Bearer cordage_xxxxxxxxxxxx`

````