# Invoke a workflow

Invokes an on-demand Workflow with parameters, to launch a new Workflow Run.

## Prerequisites

Before you can run the following code snippet, you need to call these APIs with the provided parameters to set up the prerequisite API object(s).

1. createCustomer
POST /v1/customers {"name":"Jenny Rosen","email":"jennyrosen@example.com"}

## Request

```curl
curl -X POST https://api.stripe.com/v2/extend/workflows/wf_test_61UNwDso5RkJhsXt116TT0rUFzSQLefl99yAJBArIFXc/invoke \
  -H "Authorization: Bearer <<YOUR_SECRET_KEY>>" \
  -H "Stripe-Version: 2026-04-22.preview" \
  --json '{
    "input_parameters": {
        "customer_id": "{{CUSTOMER_ID}}",
        "amount": 5000,
        "notify": true,
        "tags": [
            "signup",
            "promotion"
        ]
    }
  }'
```

### Response

```json
{
  "id": "wfrun_test_61UTL7vuMHzp5fHTd16TT0rUFzSQLefl99yAJBArITFo",
  "object": "v2.extend.workflow_run",
  "created": "2026-04-08T14:33:27.076Z",
  "status": "started",
  "status_details": {
    "failed": null,
    "started": {},
    "succeeded": null
  },
  "status_transitions": {
    "failed_at": null,
    "started_at": "2026-04-08T14:33:27.335Z",
    "succeeded_at": null
  },
  "trigger": {
    "manual": {
      "input_parameters": {
        "customer_id": "cus_SJjFsJvGPQKfH1",
        "amount": 5000,
        "notify": true,
        "tags": [
          "signup",
          "promotion"
        ]
      }
    },
    "type": "manual"
  },
  "workflow": "wf_test_61UNwDso5RkJhsXt116TT0rUFzSQLefl99yAJBArIFXc",
  "livemode": false
}
```

## Parameters

- `input_parameters` (map, required)
  Parameters used to invoke the Workflow Run.

## Returns

## Response attributes

- `id` (string)
  The unique ID of the Workflow Run.

- `object` (string, value is "v2.extend.workflow_run")
  String representing the object’s type. Objects of the same type share the same value of the object field.

- `created` (timestamp)
  When the Workflow Run was created.

- `livemode` (boolean)
  Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.

- `status` (enum)
  The current Workflow Run execution status.
Possible enum values:
  - `failed`
    This Workflow Run has terminated because of a failure.

  - `started`
    This Workflow Run is actively executing.

  - `succeeded`
    This Workflow Run has progressed to a successful completion.

- [`status_details`](https://docs.stripe.com/api/v2/extend/workflow-runs/invoke-workflow.md?query=status_details&api-version=2026-04-22.preview) (object, nullable)
  Details about the Workflow Run’s status transitions.

- [`status_transitions`](https://docs.stripe.com/api/v2/extend/workflow-runs/invoke-workflow.md?query=status_transitions&api-version=2026-04-22.preview) (object)
  Summary information about the Workflow Run’s status transitions.

- [`trigger`](https://docs.stripe.com/api/v2/extend/workflow-runs/invoke-workflow.md?query=trigger&api-version=2026-04-22.preview) (object)
  A record of the trigger that launched this Workflow Run.

- `workflow` (string)
  The Workflow this Run belongs to.

## Error Codes

| HTTP status code | Code | Description |
| --- | --- | --- |
| 400 | invalid_workflow_input_parameters | The Workflow invocation failed because the input parameters were invalid. |
| 400 | workflow_not_invokable | The Workflow target of an invoke request is not invokable because it is not configured to have an on-demand trigger. |
| 404 | not_found | The resource wasn’t found. |
| 409 | idempotency_error | An idempotent retry occurred with different request parameters. |
