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

# Get Workflow API

> Retrieve a workflow with its draft metadata and every published version, including per-version campaign and outcome totals.



## OpenAPI

````yaml GET /workflows/{workflow_id}
openapi: 3.1.0
info:
  title: Bolna API
  description: >-
    Use and leverage Bolna Voice AI using APIs through HTTP requests from any
    language in your applications and workflows.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.bolna.ai
    description: Production server
security:
  - bearerAuth: []
paths:
  /workflows/{workflow_id}:
    get:
      description: >-
        Retrieves a workflow with its draft metadata and the metadata of every
        published version, including per-version campaign and outcome totals.
      parameters:
        - in: path
          name: workflow_id
          required: true
          schema:
            type: string
            format: uuid
          description: The unique `id` of the workflow
      responses:
        '200':
          description: Workflow detail
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowDetail'
        '404':
          description: Workflow not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowError'
components:
  schemas:
    WorkflowDetail:
      type: object
      required:
        - workflow
        - published
      properties:
        workflow:
          $ref: '#/components/schemas/Workflow'
        draft:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/WorkflowVersionMeta'
          description: The current draft's metadata, or `null` if none exists.
        published:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowVersionMeta'
          description: >-
            Every published version, newest first, each with its campaign
            outcome totals.
    WorkflowError:
      type: object
      description: >-
        Error envelope returned by every workflow endpoint. `detail.code` is a
        stable machine-readable code; extra keys (such as `current_revision` on
        `revision_conflict`, `execution_id` on `duplicate_run`, or `issues` on
        `invalid_definition`) ride alongside it.
      required:
        - detail
      properties:
        detail:
          type: object
          additionalProperties: true
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Machine-readable error code.
              example: revision_conflict
            message:
              type: string
              description: Human-readable explanation.
    Workflow:
      type: object
      required:
        - id
        - name
        - status
      properties:
        id:
          type: string
          format: uuid
          description: Unique workflow id.
        name:
          type: string
          description: Display name.
        status:
          type: string
          enum:
            - active
            - archived
          description: Workflow status.
        latest_published_version:
          type: integer
          nullable: true
          description: >-
            Number of the newest published version, or `null` if nothing is
            published yet.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    WorkflowVersionMeta:
      type: object
      description: Metadata of one draft or published version, without the definition body.
      required:
        - version
        - state
        - revision
      properties:
        version:
          type: integer
          description: >-
            Version number. The draft carries the number it will get when
            published.
        state:
          type: string
          enum:
            - draft
            - published
            - archived
        revision:
          type: integer
          description: >-
            Draft save counter — the compare-and-set token for the [Save Draft
            API](/api-reference/workflows/save-draft).
        published_at:
          type: string
          format: date-time
          nullable: true
        campaigns:
          type: integer
          description: Campaigns pinned to this version.
        contacts:
          type: integer
          description: Contacts run through this version.
        success_count:
          type: integer
        failure_count:
          type: integer
        neutral_count:
          type: integer
        terminal_count:
          type: integer
          description: Executions that reached any terminal state.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````