# List workflow runs (/docs/api-reference/workflows/listWorkflowExecutions)

> List recent runs of a workflow, newest first, with the step that failed.

> **Workflow builder.** Included from the Jump Starter plan. [See plans](https://omnidim.io/pricing).

**GET** `/workflows/{workflow_id}/executions`

List recent runs of a workflow, newest first, with the step that failed.

Use it to find the run behind "my workflow didn't run after the call":
filter by `state=failed`, or by the `call_sid` of the call that should
have started it. Read one run's steps with `getWorkflowExecution`.

```yaml
operationId: listWorkflowExecutions
parameters:
  - in: path
    name: workflow_id
    required: true
    schema:
      type: integer
    description: Id of the workflow.
  - in: query
    name: state
    schema:
      type: string
      enum:
        - running
        - waiting
        - completed
        - failed
        - cancelled
    description: Only runs in this state.
  - in: query
    name: call_sid
    schema:
      type: string
    description: Only runs started by this call.
  - in: query
    name: limit
    schema:
      type: integer
      default: 20
      minimum: 1
      maximum: 100
    description: How many runs to return.
  - in: query
    name: user_id
    required: false
    description: |
      Reseller keys only: act as one of your clients by its user id. Omit
      it to act on your own account.
      [How acting for a client works](/docs/reseller/your-clients/acting-as-clients).
    schema:
      type: integer
      description: |
        Reseller keys only: act as one of your clients by its user id. Omit
        it to act on your own account.
        [How acting for a client works](/docs/reseller/your-clients/acting-as-clients).
      example: 1234
responses:
  '200':
    description: The runs, newest first.
    content:
      application/json:
        schema:
          type: object
          properties:
            executions:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: integer
                  state:
                    type: string
                    enum:
                      - running
                      - waiting
                      - completed
                      - failed
                      - cancelled
                  test:
                    type: boolean
                    description: True for a run started by `testWorkflow`.
                  call_sid:
                    type: string
                    nullable: true
                    description: The call that started the run, if a call did.
                  started_at:
                    type: string
                    description: When the run started (UTC).
                  updated_at:
                    type: string
                    description: When the run last changed (UTC).
                  failed_node:
                    type: string
                    nullable: true
                    description: The id of the first step that failed.
                  error:
                    type: string
                    nullable: true
                    description: That step's error.
                  warning_node:
                    type: string
                    nullable: true
                    description: The id of the first step that got an HTTP error back but went on.
                  warning:
                    type: string
                    nullable: true
                    description: |
                      Why that step needs a look, for example a Custom API call that got HTTP 404.
                      The run still reads completed when "fail on non-2xx" is off.
  '400':
    description: A filter is not valid.
  '401':
    description: Missing or invalid API key.
    content:
      application/json:
        schema:
          type: object
          description: |
            The v1 error envelope. Some errors add keys: `errors` (validation
            issues), `op_index` and `hint` (a refused op), `revision` (the current
            revision after a conflict).
          properties:
            error:
              type: string
              description: Machine-readable error code, such as `revision_conflict`.
            error_description:
              type: string
              description: Human-readable explanation.
            code:
              type: string
              description: Stable, specific reason. Present on 400 errors and auth errors.
            request_id:
              type: string
              description: >-
                Correlates this response with the server log. Also sent as the `X-Request-Id`
                header.
            errors:
              type: array
              description: On `validation_failed`, the issues that blocked the request.
              items:
                type: object
                description: One problem found in a draft.
                properties:
                  code:
                    type: string
                    description: >
                      Stable issue code. `not_found`: an id is not in this workspace, pick one with

                      `listWorkflowFieldOptions`. `templated_ref`: an id field holds a `{{ }}`
                      template; ids

                      must be literal. Others include `missing_field`, `bad_option`, `bad_handle`,

                      `unreachable`, `trigger_count`, `unknown_type`, `unknown_reference` and
                      `malformed`.
                  message:
                    type: string
                  node:
                    type: string
                    nullable: true
                    description: Id of the node the issue is about, if any.
                  field:
                    type: string
                    nullable: true
                    description: Config field the issue is about, if any.
                  hint:
                    type: string
                    nullable: true
                    description: What to do to fix it.
            op_index:
              type: integer
              description: On `invalid_op`, the zero-based position of the op that failed.
            hint:
              type: string
              description: On `invalid_op`, what to do next.
            revision:
              type: string
              description: On `revision_conflict`, the current revision of the draft.
        example:
          error: unauthorized
          error_description: Missing or invalid API key
          code: invalid_api_key
          request_id: req_6e2b9d4f1a38
  '403':
    description: |
      The Workflow Builder is not enabled for this account
      (`feature_not_enabled`), or your API key's user cannot make this
      change (`permission_denied`). The Workflow Builder must be included in
      your plan.
    content:
      application/json:
        schema:
          type: object
          description: |
            The v1 error envelope. Some errors add keys: `errors` (validation
            issues), `op_index` and `hint` (a refused op), `revision` (the current
            revision after a conflict).
          properties:
            error:
              type: string
              description: Machine-readable error code, such as `revision_conflict`.
            error_description:
              type: string
              description: Human-readable explanation.
            code:
              type: string
              description: Stable, specific reason. Present on 400 errors and auth errors.
            request_id:
              type: string
              description: >-
                Correlates this response with the server log. Also sent as the `X-Request-Id`
                header.
            errors:
              type: array
              description: On `validation_failed`, the issues that blocked the request.
              items:
                type: object
                description: One problem found in a draft.
                properties:
                  code:
                    type: string
                    description: >
                      Stable issue code. `not_found`: an id is not in this workspace, pick one with

                      `listWorkflowFieldOptions`. `templated_ref`: an id field holds a `{{ }}`
                      template; ids

                      must be literal. Others include `missing_field`, `bad_option`, `bad_handle`,

                      `unreachable`, `trigger_count`, `unknown_type`, `unknown_reference` and
                      `malformed`.
                  message:
                    type: string
                  node:
                    type: string
                    nullable: true
                    description: Id of the node the issue is about, if any.
                  field:
                    type: string
                    nullable: true
                    description: Config field the issue is about, if any.
                  hint:
                    type: string
                    nullable: true
                    description: What to do to fix it.
            op_index:
              type: integer
              description: On `invalid_op`, the zero-based position of the op that failed.
            hint:
              type: string
              description: On `invalid_op`, what to do next.
            revision:
              type: string
              description: On `revision_conflict`, the current revision of the draft.
        example:
          error: forbidden
          error_description: You do not have permission to use Workflows.
          code: feature_not_enabled
          request_id: req_9f2c1a4b7d3e
  '404':
    description: No workflow, node type or run with that id in your account.
    content:
      application/json:
        schema:
          type: object
          description: |
            The v1 error envelope. Some errors add keys: `errors` (validation
            issues), `op_index` and `hint` (a refused op), `revision` (the current
            revision after a conflict).
          properties:
            error:
              type: string
              description: Machine-readable error code, such as `revision_conflict`.
            error_description:
              type: string
              description: Human-readable explanation.
            code:
              type: string
              description: Stable, specific reason. Present on 400 errors and auth errors.
            request_id:
              type: string
              description: >-
                Correlates this response with the server log. Also sent as the `X-Request-Id`
                header.
            errors:
              type: array
              description: On `validation_failed`, the issues that blocked the request.
              items:
                type: object
                description: One problem found in a draft.
                properties:
                  code:
                    type: string
                    description: >
                      Stable issue code. `not_found`: an id is not in this workspace, pick one with

                      `listWorkflowFieldOptions`. `templated_ref`: an id field holds a `{{ }}`
                      template; ids

                      must be literal. Others include `missing_field`, `bad_option`, `bad_handle`,

                      `unreachable`, `trigger_count`, `unknown_type`, `unknown_reference` and
                      `malformed`.
                  message:
                    type: string
                  node:
                    type: string
                    nullable: true
                    description: Id of the node the issue is about, if any.
                  field:
                    type: string
                    nullable: true
                    description: Config field the issue is about, if any.
                  hint:
                    type: string
                    nullable: true
                    description: What to do to fix it.
            op_index:
              type: integer
              description: On `invalid_op`, the zero-based position of the op that failed.
            hint:
              type: string
              description: On `invalid_op`, what to do next.
            revision:
              type: string
              description: On `revision_conflict`, the current revision of the draft.
        example:
          error: not_found
          error_description: No workflow with that id.
          request_id: req_2c8e7a1d9b40
```

**curl**

```bash
curl -X GET "https://omnidim.io/api/v1/workflows/{workflow_id}/executions?user_id=1234" \
  -H "Authorization: Bearer $OMNIDIM_API_KEY"
```