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

# Get Workflow Run Output

> Read the public output of a workflow run after it completes.

Retrieve the final public output for one workflow run.

The endpoint can return any JSON value defined by the workflow. The synchronization contract below requires an object containing a `documents` array.

## Authentication and scope

Requires `workflow-runs-output-read`. The token owner must be an administrator of the workflow workspace. A synchronization token also needs `workspaces-read`, `workflows-read`, and `documents-read` for discovery and document downloads.

## Synchronizable output

End the workflow with `files.persistWorkspace` and expose its `documents` array as the final public output.

```json theme={null}
{
  "documents": [
    {
      "type": "documentRef",
      "documentId": "880e8400-e29b-41d4-a716-446655440000",
      "workspaceId": "12",
      "filename": "export.zip",
      "mime": "application/zip",
      "size": 12345,
      "sha256": "6de7f6f5894c9f3fd1f6f8a4d1b3115d0d9b4b19d7a8a661f9fe90f9c2d80c3b",
      "source": {
        "type": "workflow_file",
        "url": null
      },
      "createdAt": "2026-07-21T12:34:55.000000Z"
    }
  ]
}
```

Use `documentId` with the workspace document URL endpoint. Do not use the workflow run `file` endpoint for these persisted documents; that route serves temporary runtime `fileRef` values.

Treat a missing `documents` array, a non-array value, or an entry without `documentId` or `filename` as an invalid page. Do not advance the page cursor until the output has been validated and recorded for retry.


## OpenAPI

````yaml get /workspaces/{workspaceId}/workflows/{workflowId}/runs/{runId}/output
openapi: 3.0.1
info:
  title: Raydocs API
  description: REST API for document extraction with AI-powered data parsing
  version: 1.0.0
servers:
  - url: https://api.raydocs.com
security:
  - bearerAuth: []
tags:
  - name: Workspaces
    description: Create and manage workspaces.
  - name: Workspace Users
    description: Manage users within a workspace.
  - name: Extraction Templates
    description: Define extraction schemas and settings.
  - name: Extraction Sessions
    description: Manage extraction jobs and documents.
  - name: Batch Operations
    description: Bulk operations on sessions.
  - name: Documents
    description: Upload and manage source documents.
  - name: Workflows
    description: Discover workflow runs and read their public outputs.
  - name: Results
    description: Access extraction results.
paths:
  /workspaces/{workspaceId}/workflows/{workflowId}/runs/{runId}/output:
    get:
      tags:
        - Workflows
      summary: Get Workflow Run Output
      description: >-
        Return the workflow's public output. Requires
        `workflow-runs-output-read`; the token owner must be a workspace
        administrator.
      operationId: getWorkflowRunOutput
      parameters:
        - name: workspaceId
          in: path
          required: true
          schema:
            type: integer
        - name: workflowId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: runId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Public workflow output
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    additionalProperties: true
                    nullable: true
                  - type: array
                    items: {}
                  - type: string
                  - type: number
                  - type: boolean
        '403':
          description: Forbidden
        '404':
          description: Run does not belong to the route workflow
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        Personal Access Token created from the Raydocs dashboard.

        Include in the Authorization header: `Bearer <your_token>`

        See [API Keys](/api-reference/api-keys) for token creation and
        management.

````