Skip to main content
POST
/
workflows
/
{workflow_id}
/
executions
Start workflow execution
curl --request POST \
  --url https://api.kapso.ai/platform/v1/workflows/{workflow_id}/executions \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "workflow_execution": {
    "phone_number": "+14155552671",
    "phone_number_id": "<string>",
    "whatsapp_config_id": 123,
    "variables": {
      "user_name": "Alice",
      "order_id": "ORD-12345",
      "priority": "high"
    },
    "context": {
      "source": "mobile_app",
      "campaign_id": "SUMMER2024"
    },
    "initial_data": {}
  }
}'
{
  "data": {
    "message": "Workflow execution initiated",
    "workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "tracking_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  }
}

Authorizations

X-API-Key
string
header
required

Path Parameters

workflow_id
string<uuid>
required

Workflow identifier

Body

application/json

Request to start a new workflow execution. Executions are processed asynchronously - you'll receive a tracking_id immediately and can poll for results using GET /workflow_executions/{id}.

workflow_execution
object
required

Response

Workflow execution queued successfully (processing in background)

Async workflow execution initiation response (HTTP 202)

data
object
required

Async response returned when workflow execution is successfully queued (HTTP 202 Accepted). The execution will begin processing in the background. Use the tracking_id to monitor progress.