---
title: StartWorkflowRun
source: https://docs.newrelic.com/docs/workflow-automation/workflow-automation-apis/start-workflow-run
---

This API starts a workflow run for a specified workflow definition.

> #### ⚠️ IMPORTANT
>
> Number of concurrent workflow runs, and number of steps executed in a given run is defined at [Workflow System Limits](https://docs.newrelic.com/docs/workflow-automation/limitations-and-faq/workflow-limits).

## Input parameters

| Parameter          | Type   | Required | Description                                                                                                                                                                           |
| ------------------ | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `scope.id`         | String | Yes      | Your account ID.                                                                                                                                                                      |
| `scope.type`       | Enum   | Yes      | The scope type (ACCOUNT).                                                                                                                                                             |
| `definition.name`  | String | Yes      | The name of the workflow definition to run.                                                                                                                                           |
| `workflowInputs`   | Array  | No       | Optional key-value pairs to pass as inputs to the workflow.                                                                                                                           |
| `idempotencyKey`   | String | No       | A UUID that ensures idempotency of the request. The server validates this format and rejects values that are not valid UUIDs (for example, **f47ac10b-58cc-4372-a567-0e02b2c3d479**). |
| `options.logLevel` | Enum   | No       | Controls logging during execution. Values: `NONE` (default), `INFO`, `DEBUG`, `TRACE`.                                                                                                |

### logLevel option

The `logLevel` option controls the amount of logging information generated during workflow execution.

**Available values:**

-   `NONE` (default): No log outputs will be generated.
-   `INFO`: Outputs step level information.
-   `DEBUG`: Adds an attribute to the step started logs with all the action step inputs, using the format `workflowAutomation.inputs.<inputName>: <inputValue>`.
-   `TRACE`: In addition to `DEBUG` output, adds an attribute to the step started logs with all the action step outputs, using the format `workflowAutomation.outputs.<outputName>: <outputValue>`.

## Sample request

Use the [Query Builder](https://one.newrelic.com/nerdgraph-graphiql?state=b8f3b3a9-8d3e-c03e-5da4-34b98a57ff8f) to create and edit a workflow. See [NerdGraph API explorer](https://docs.newrelic.com/docs/apis/nerdgraph/get-started/nerdgraph-explorer).

```graphql
mutation {
  workflowAutomationStartWorkflowRun(
    definition: {name: "json-parsing"}
    workflowInputs: [
      {key: "checkOperational", value: "false"}
      {key: "checkNonOperational", value: "true"}]
    scope: {id: "11933347"}
    idempotencyKey: "45e65924-5316-479c-a977-f6adfa17e07a"
    options: {logLevel: INFO}
  ) {
    runId
  }
}
```

## Sample response

The mutation returns:

-   `runId`: The unique identifier for the workflow run. Use this ID with `WorkflowRunInfo`, `SignalWorkflowRun`, or `StopWorkflowRun` APIs.

## Related topics [#related-topics]

[Workflow run info](https://docs.newrelic.com/docs/workflow-automation/workflow-automation-apis/workflow-run-info)

Monitor the status and logs of your workflow run

[Signal workflow run](https://docs.newrelic.com/docs/workflow-automation/workflow-automation-apis/signal-workflow-run)

Send signals to running workflows waiting for input

[Stop workflow run](https://docs.newrelic.com/docs/workflow-automation/workflow-automation-apis/stop-workflow-run)

Cancel a running workflow instance

[Get workflow definition](https://docs.newrelic.com/docs/workflow-automation/workflow-automation-apis/get-workflow-definition)

View the workflow definition before running
