---
title: "Run Workflow"
method: POST
path: "/workflows/{workflow_name}/run"
tags: ["workflow"]
---

# Run Workflow

`POST /workflows/{workflow_name}/run`

## Path parameters

- `workflow_name` string, required

## Request body

- RunWorkflow — Parameters to run a workflow by label, version number, or latest version. workflow_label_name and workflow_version_number are mutually exclusive.
  - `workflow_label_name` string, nullable — Specify a workflow label name to run a specific labeled version.
  - `workflow_version_number` integer, nullable — Specify a workflow version number to run a specific version.
  - `metadata` object, nullable — A dictionary of metadata key-value pairs.
  - `input_variables` object — A dictionary of input variables required by the workflow.
  - `return_all_outputs` boolean — If set to `true`, all outputs from the workflow execution will be returned.
  - `callback_url` string, uri, nullable — HTTP URL where execution results are posted asynchronously. When provided, the API returns 202 Accepted immediately.

## Response `201`

Workflow execution created successfully

- RunWorkflowResponse — Response after initiating a workflow execution.
  - `success` boolean, required — Indicates if the request was successful.
  - `message` string, required — A message describing the result.
  - `warning` string, nullable — Warning about missing or unused input variables, if any.
  - `workflow_version_execution_id` integer, required — The ID of the created workflow execution.

## Other responses

- `202` — Accepted. Returned when callback_url is provided and the workflow will deliver results asynchronously.
- `400` — Bad Request
- `401` — Unauthorized - missing or invalid API key.
- `404` — Not found - requested resource does not exist or is not accessible.
- `422` — Validation error - request parameters or body are invalid.

---

[API](https://skmtc.dev/promptlayer/apis/promptlayer-api.md) · [All operations](https://skmtc.dev/promptlayer/apis/promptlayer-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/promptlayer/promptlayer-api/revisions/a23093a0a506/schema)
