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

# [Deprecated] Terminate the latest workflow run

> Force terminates the latest run. Deprecated; use `POST /workflow/{id}/runs/{rid}/terminate` to target a specific run. Scheduled for removal after 2026-07-16.



## OpenAPI

````yaml /openapi.json post /workflow/{id}/terminate
openapi: 3.0.0
info:
  title: Output.ai API
  version: 1.0.0
  description: API for managing and executing Output.ai workflows
servers:
  - url: http://localhost:3001
    description: Development server
security: []
tags: []
paths:
  /workflow/{id}/terminate:
    post:
      summary: '[Deprecated] Terminate the latest workflow run'
      description: >-
        Force terminates the latest run. Deprecated; use `POST
        /workflow/{id}/runs/{rid}/terminate` to target a specific run. Scheduled
        for removal after 2026-07-16.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                reason:
                  type: string
      responses:
        '200':
          description: The workflow run was terminated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TerminateWorkflowResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '500':
          $ref: '#/components/responses/InternalServerError'
      deprecated: true
components:
  schemas:
    TerminateWorkflowResponse:
      type: object
      properties:
        terminated:
          type: boolean
        workflowId:
          type: string
        runId:
          type: string
    ValidationErrorResponse:
      type: object
      description: Request body validation failure (Zod)
      properties:
        error:
          type: string
          enum:
            - ValidationError
        message:
          type: string
          example: Invalid Payload
        issues:
          type: array
          description: Zod validation issues
          items:
            type: object
    ErrorResponse:
      type: object
      description: >-
        API error body (WorkflowNotFoundError, UnsupportedWorkflowError,
        WorkflowExecutionTimedOutError, WorkflowNotCompletedError,
        CatalogNotAvailableError, or server error)
      properties:
        error:
          type: string
          description: >-
            Error type name (e.g. WorkflowNotFoundError,
            UnsupportedWorkflowError, CatalogNotAvailableError)
        message:
          type: string
          description: Human-readable error message
        workflowId:
          type: string
          description: >-
            Workflow ID when the error is tied to a specific execution (e.g.
            timeout)
          nullable: true
  responses:
    BadRequest:
      description: Invalid request body, query, or pagination token
      content:
        application/json:
          schema:
            oneOf:
              - $ref: '#/components/schemas/ValidationErrorResponse'
              - $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Workflow execution, workflow type, or catalog not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Conflict:
      description: >-
        Workflow run is in a state that conflicts with the requested operation
        (e.g. operating on an already-terminal run, or resetting to an
        incomplete step).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerError:
      description: Internal server error (e.g. Temporal connection failure)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'

````