POST
/
v2
/
runs
curl --request POST \
  --url https://api.workflows.tryleap.ai/v2/runs \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '{
  "workflow_id": "wkfv2_bZNg4zPR44mA",
  "trigger_id": "ncc6725",
  "webhook_url": "https://myapp.com/webhook",
  "input": {
    "first_name": "Sam",
    "last_name": "Altman"
  }
}'
{
  "id": "<string>",
  "version_id": "<string>",
  "workflow_id": "<string>",
  "status": "completed",
  "created_at": "<string>",
  "error": null,
  "result": null
}

This endpoint initiates a workflow run asynchronously. It returns a workflow run id immediately and does not wait for completion.

To monitor the workflow’s progress and get results, use the Get Workflow Run endpoint with the returned id. A common pattern is to poll this endpoint periodically until the workflow completes.

Authorizations

X-Api-Key
string
header
required

Body

application/json

Response

200
application/json
The workflow has been successfully initiated.

The response is of type object.