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

# Submit Workflow

> Submit one or more files for data extraction using a predefined extraction template. This is an asynchronous operation - files are queued for processing and you must poll the status endpoint to get results.

## Important Notes

* This is an **async operation** - the response means the files are accepted for processing
* Use the returned `doc_id` with `/runs/getDetails` to check processing status
* `file_urls` must be publicly accessible or use presigned URLs
* Processing time varies by file size and complexity

## Supported File Formats

* **Images:** PNG, JPG, JPEG, GIF, WEBP
* **Documents:** PDF


## OpenAPI

````yaml /api-reference/openapi.json post /workflows/submit
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/submit:
    post:
      tags:
        - Workflow Submission
      summary: Submit Workflow
      description: >-
        Submit one or more files for data extraction using a predefined
        extraction template. This is an asynchronous operation - files are
        queued for processing and you must poll the status endpoint to get
        results.
      operationId: submitWorkflow
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkflowSubmitRequest'
            example:
              agent_name: John Doe
              file_urls:
                - https://example.com/documents/contract-page-1.jpg
                - https://example.com/documents/contract-page-2.jpg
                - https://example.com/documents/attachment.pdf
              extraction_template_id: ecf1adf3-11f5-4ff7-a4d1-92367384d7ba
              metadata:
                example_property: example_value
                example_property2: example_value2
              run_id: Contract-12345-Review
      responses:
        '202':
          description: Workflow accepted for processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowSubmitResponse'
              example:
                message: File Accepted
                doc_id: f47ac10b-58cc-4372-a567-0e02b2c3d479
        '400':
          description: Bad Request - Invalid parameters or missing required fields
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    WorkflowSubmitRequest:
      type: object
      required:
        - file_urls
        - extraction_template_id
        - run_id
      properties:
        agent_name:
          type: string
          description: Identifier for tracking (e.g., agent name or API client identifier)
          example: John Doe
        file_urls:
          type: array
          items:
            type: string
            format: uri
          description: >-
            Array of publicly accessible URLs to the files to process. Supports
            images (PNG, JPG, etc.) and PDFs.
          example:
            - https://example.com/documents/insurance-card.jpg
            - https://example.com/documents/benefits.pdf
        extraction_template_id:
          type: string
          format: uuid
          description: >-
            ID of the extraction template to use. Get available templates from
            /extractionTemplates/getAll
          example: ecf1adf3-11f5-4ff7-a4d1-92367384d7ba
        run_id:
          type: string
          description: >-
            Human-readable name for this workflow run (e.g.,
            'Invoice-12345-Processing')
          example: Contract-12345-Review
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Optional custom key-value pairs for filtering and tracking.
            Searchable via /workflows/getData
          example:
            example_property: example_value
            example_property2: example_value2
    WorkflowSubmitResponse:
      type: object
      properties:
        message:
          type: string
          example: File Accepted
        doc_id:
          type: string
          format: uuid
          description: >-
            Unique identifier for the submitted workflow. Use this with
            /workflows/getDetails to check status.
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message describing what went wrong
        details:
          type: string
          description: Additional details about the error (optional)
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: API key obtained from the EmberQA dashboard under the "Integrations" tab

````