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

# Get workflow runs

> Retrieve execution run history and performance statistics for a workflow.

Retrieves historical execution run logs for a workflow. Use this endpoint to audit performance, monitor execution frequency, or identify failed runs.

### Path Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | **Yes** | Unique identifier of the workflow (`wkf_...`). |

### Query Parameters

| Field | Type | Description |
| - | - | - |
| `limit` | `number` | Max runs to return (default `10`, max `100`). |
| `cursor` | `string` | Optional cursor string for pagination. |

### cURL Example

```bash theme={null}
curl "https://posttu.com/api/v1/workflow/wkf_abc123/runs?limit=5" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

### Response Example

```json theme={null}
{
  "data": [
    {
      "id": "run_999",
      "workflowId": "wkf_abc123",
      "status": "SUCCESS",
      "durationMs": 1420,
      "stepCount": 3,
      "startedAt": "2026-07-29T12:00:00.000Z",
      "finishedAt": "2026-07-29T12:00:01.420Z",
      "errorMessage": null
    },
    {
      "id": "run_998",
      "workflowId": "wkf_abc123",
      "status": "FAILED",
      "durationMs": 310,
      "stepCount": 1,
      "startedAt": "2026-07-29T11:00:00.000Z",
      "finishedAt": "2026-07-29T11:00:00.310Z",
      "errorMessage": "HTTP 401 Unauthorized from target API endpoint"
    }
  ],
  "nextCursor": null,
  "success": true
}
```


## OpenAPI

````yaml openapi.json GET /api/v1/workflow/{id}/runs
openapi: 3.1.0
info:
  title: Posttu API
  version: 1.0.0
  description: >-
    Posttu V1 REST API — Workflow automation, social-media post management,
    inbox, tags, and calendar.
servers:
  - url: https://posttu.com
    description: Production
security: []
paths:
  /api/v1/workflow/{id}/runs:
    get:
      tags:
        - Workflow
      summary: Get workflow runs
      parameters:
        - schema:
            type: string
            description: Workflow ID
            example: wkf_123abc
          required: true
          description: Workflow ID
          name: id
          in: path
        - schema:
            type: string
            description: Filter by workflow ID
            example: wkf_123abc
          required: false
          description: Filter by workflow ID
          name: workflowId
          in: query
        - schema:
            type: number
            minimum: 1
            maximum: 100
            default: 20
            description: Max items
            example: 20
          required: false
          description: Max items
          name: limit
          in: query
        - schema:
            type: string
            description: Pagination cursor
          required: false
          description: Pagination cursor
          name: cursor
          in: query
        - schema:
            type: string
            enum:
              - PENDING
              - RUNNING
              - COMPLETED
              - FAILED
              - PAUSED
              - CANCELED
            description: Filter by run status
            example: COMPLETED
          required: false
          description: Filter by run status
          name: status
          in: query
      responses:
        '200':
          description: Paginated runs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowRunsListResponse'
        '401':
          description: Error response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
      security:
        - ApiKeyAuth: []
components:
  schemas:
    WorkflowRunsListResponse:
      type: object
      properties:
        runs:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowRun'
          description: List of workflow runs
        nextCursor:
          type:
            - string
            - 'null'
          description: Pagination cursor
      required:
        - runs
    WorkflowRun:
      type: object
      properties:
        id:
          type: string
          description: Run ID
          example: run_def456
        status:
          type: string
          enum:
            - PENDING
            - RUNNING
            - COMPLETED
            - FAILED
            - PAUSED
            - CANCELED
          description: Workflow run status
          example: COMPLETED
        startedAt:
          type:
            - string
            - 'null'
          format: date-time
          description: Start timestamp
          example: '2024-01-20T10:00:00.000Z'
        completedAt:
          type:
            - string
            - 'null'
          format: date-time
          description: Completion timestamp
          example: '2024-01-20T10:05:00.000Z'
        workflowId:
          type: string
          description: Workflow ID
          example: wkf_abc123
        workflowName:
          type: string
          description: Workflow name
          example: Daily Post Automation
        input:
          type: object
          additionalProperties: {}
          description: Run input payload
        output:
          type: object
          additionalProperties: {}
          description: Run output
        error:
          type:
            - string
            - 'null'
          description: Error message if failed
      required:
        - id
        - status
        - workflowId
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: 'Pass your API key via the Authorization header: `Bearer <api-key>`'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.