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

# Get workflow execution status (latest run)

> Returns the status of the latest run for the given workflow. To pin a specific run, use `/workflow/{id}/runs/{rid}/status`.



## OpenAPI

````yaml /openapi.json get /workflow/{id}/status
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}/status:
    get:
      summary: Get workflow execution status (latest run)
      description: >-
        Returns the status of the latest run for the given workflow. To pin a
        specific run, use `/workflow/{id}/runs/{rid}/status`.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
          description: The id of workflow to retrieve the status
      responses:
        '200':
          description: The workflow status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowStatusResponse'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    WorkflowStatusResponse:
      type: object
      properties:
        workflowId:
          type: string
          description: The id of workflow
        runId:
          type: string
          description: The specific run id for this execution
        status:
          type: string
          enum:
            - canceled
            - completed
            - continued_as_new
            - failed
            - running
            - terminated
            - timed_out
            - unspecified
          description: The workflow execution status
        startedAt:
          type: number
          description: An epoch timestamp representing when the workflow started
        completedAt:
          type: number
          description: An epoch timestamp representing when the workflow ended
    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:
    NotFound:
      description: Workflow execution, workflow type, or catalog not found
      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'

````