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

# Get Workflow Run Details

> Retrieve detailed information for a specific workflow run including processing status and extraction results. Use this to check if processing is complete and get the extracted data.

## Status Values

| Status       | Description                                                |
| ------------ | ---------------------------------------------------------- |
| `pending`    | Queued for processing                                      |
| `processing` | Currently being processed                                  |
| `completed`  | Successfully completed - check `output_schema` for results |
| `failed`     | Processing failed - check `failure_reason` for details     |

## Result Data

When status is `completed`, the response includes:

* `output_schema` - Extracted data where each field contains a `value` and `reasoning`
* `supportingDocs` - Array of processed files with presigned download URLs

## Output Schema Format

Each field in `output_schema` returns an object with:

* `value` - The extracted data (string or null if not found)
* `reasoning` - Explanation of how/why the value was extracted


## OpenAPI

````yaml /api-reference/openapi.json post /workflows/runs/getDetails
openapi: 3.0.3
info:
  title: EmberQA Call Scoring API
  description: >-
    Submit call recordings programmatically for scoring and analysis. This API
    allows you to integrate call scoring directly into your existing systems and
    workflows.


    ## Authentication

    All requests require a Bearer token in the Authorization header. API keys
    are provided on the EmberQA dashboard under the "Integrations" tab.


    ## Audio Requirements

    - **Supported formats:** MP3, WAV

    - **Maximum file size:** 100MB

    - **Audio quality:** Minimum 8kHz sample rate recommended
  version: 1.0.0
  contact:
    name: EmberQA Support
    url: https://emberqa.com
servers:
  - url: https://api.emberqa.com/api
    description: Production server
security:
  - BearerAuth: []
paths:
  /workflows/runs/getDetails:
    post:
      tags:
        - Workflow Runs
      summary: Get Workflow Run Details
      description: >-
        Retrieve detailed information for a specific workflow run including
        processing status and extraction results. Use this to check if
        processing is complete and get the extracted data.
      operationId: getWorkflowDetails
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetWorkflowDetailsRequest'
            example:
              id: f47ac10b-58cc-4372-a567-0e02b2c3d479
      responses:
        '200':
          description: Successfully retrieved workflow run details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowDetailsResponse'
              examples:
                completed:
                  summary: Completed workflow
                  value:
                    statusCode: SUCCESS
                    statusMessage: Successfully retrieved workflow run details
                    doc:
                      id: f47ac10b-58cc-4372-a567-0e02b2c3d479
                      filename: Contract-12345-Review
                      status: completed
                      created_time: '2024-01-15T10:30:00Z'
                      metadata:
                        example_property: example_value
                        example_property2: example_value2
                      output_schema:
                        contract_number:
                          value: CTR-789456
                          reasoning: >-
                            Found in the header section on page 1, labeled
                            'Contract #'
                        effective_date:
                          value: '2024-01-01'
                          reasoning: >-
                            Located in the terms section, specified as
                            'Effective Date: January 1, 2024'
                        total_value:
                          value: $50,000
                          reasoning: >-
                            Extracted from the payment schedule showing total
                            contract value
                        payment_terms:
                          value: Net 30
                          reasoning: Found in payment terms section on page 2
                      supportingDocs:
                        - id: doc-123
                          filename: contract-page-1.jpg
                          filenameUrl: https://storage.example.com/...
                failed:
                  summary: Failed workflow
                  value:
                    statusCode: SUCCESS
                    doc:
                      id: f47ac10b-58cc-4372-a567-0e02b2c3d479
                      status: failed
                      failure_reason: Could not download file from provided URL
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Workflow run not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    GetWorkflowDetailsRequest:
      type: object
      required:
        - id
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the workflow run (doc_id from submit response)
          example: f47ac10b-58cc-4372-a567-0e02b2c3d479
    WorkflowDetailsResponse:
      type: object
      properties:
        statusCode:
          type: string
          example: SUCCESS
        statusMessage:
          type: string
          example: Successfully retrieved workflow run details
        doc:
          $ref: '#/components/schemas/WorkflowRunDetails'
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message describing what went wrong
        details:
          type: string
          description: Additional details about the error (optional)
    WorkflowRunDetails:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the workflow run
        filename:
          type: string
          description: Name of the workflow run (from run_id)
        status:
          type: string
          enum:
            - pending
            - processing
            - completed
            - failed
          description: Current processing status
        created_time:
          type: string
          format: date-time
          description: Timestamp when the workflow was submitted
        metadata:
          type: object
          additionalProperties:
            type: string
          description: Custom metadata provided during submission
        output_schema:
          type: object
          additionalProperties:
            type: object
            properties:
              value:
                type: string
                nullable: true
                description: The extracted value, or null if not found
              reasoning:
                type: string
                nullable: true
                description: Explanation of how/why the value was extracted
          description: >-
            Extracted data matching your template fields (when status is
            completed). Each field contains a value and reasoning.
        supportingDocs:
          type: array
          items:
            $ref: '#/components/schemas/SupportingDoc'
          description: Array of processed files with presigned download URLs
        failure_reason:
          type: string
          description: >-
            Error message explaining why processing failed (when status is
            failed)
        mdFileUrl:
          type: string
          format: uri
          description: URL to combined markdown file if applicable
    SupportingDoc:
      type: object
      properties:
        id:
          type: string
          description: Document identifier
        filename:
          type: string
          description: Original filename
        filenameUrl:
          type: string
          format: uri
          description: Presigned URL to download the processed file
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: API key obtained from the EmberQA dashboard under the "Integrations" tab

````