POST /v1/workflows/{id}/run
Run a workflow with optional payload. Works for draft, active, and paused workflows. Does not count against maxRuns or enforce cooldown.
POST
/v1/workflows/{id}/run
Run a workflow with optional payload. Works for draft, active, and paused workflows. Does not count against maxRuns or enforce cooldown.
Path Parameters
id
string
required
path
Workflow ID
Request Body
Optional payload
application/jsonOne of:
Option 1
Option 2
chatMessageId
string
Optional assistant chat message that launched this run.
dustTest
boolean
When true, run with auto-calculated dust amounts (~$0.01 USD).
Mutually exclusive with Simulate.
payload
object
Optional payload
runId
string
Optional run ID. If provided, must start with "run_" prefix.
Use this to subscribe to SSE stream before triggering the run.
simulate
boolean
When true, run the workflow in simulation mode (dry-run).
version
integer
Optional version number. When set, run this specific version instead of
the default (which prioritizes draft). Useful for testing the live version
while a draft exists.
Responses
200
OK
application/jsoncode
integer
data
object
runId
string
message
string
requestId
string
400
Bad request or workflow is archived
404
Workflow not found
curl -X POST 'https://api.example.com/v1/workflows/string/run' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Content-Type: application/json' \ -d '{}'
const response = await fetch('https://api.example.com/v1/workflows/string/run', { method: 'POST', headers: { "Authorization": "Bearer YOUR_API_TOKEN", "Content-Type": "application/json" }, body: JSON.stringify({})});const data = await response.json();console.log(data);
import requestsheaders = { 'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.post('https://api.example.com/v1/workflows/string/run', headers=headers, json={})print(response.json())
package mainimport ( "fmt" "io" "net/http" "strings")func main() { body := strings.NewReader(`{}`) req, _ := http.NewRequest("POST", "https://api.example.com/v1/workflows/string/run", body) req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN") req.Header.Set("Content-Type", "application/json") resp, _ := http.DefaultClient.Do(req) defer resp.Body.Close() result, _ := io.ReadAll(resp.Body) fmt.Println(string(result))}
200
Response
{ "code": 200, "data": { "runId": "run_c9i6j8k2l0m3" }, "message": "success", "requestId": "abc-123"}
API Playground
Try this endpoint
POST
/v1/workflows/{id}/run
