---
title: "Run a workflow"
method: POST
path: "/api/v1/agentic/work-flows/run-workflow/{id}"
tags: ["Agentic - Work Flows"]
---

# Run a workflow

`POST /api/v1/agentic/work-flows/run-workflow/{id}`

## Request

- Base URL: `https://api.voicelogica.ai`
- URL: `https://api.voicelogica.ai/api/v1/agentic/work-flows/run-workflow/{id}`
- Auth: API key in header `x-api-key`

## Headers

- `x-api-key` string, required
- `x-company-id` string

## Request body

- object
  - `workflowId` string: Workflow ID
  - `connectionId` string: Connection ID
  - `payload` object: Dynamic key-value pairs for workflow execution
    - `agent_id` string: Agent ID
    - `call` object
      - `company_phone_number` string, required: Company phone number
      - `call_direction` 'inbound' | 'outbound', required: Call direction
      - `phone_number` string, required: Phone number
      - `id` string, required: Call ID
    - `keyword_input` string: Keyword input
    - `dtmf_input` number: DTMF input
  - `triggerType` 'onCallStart' | 'onCallConnect' | 'onCallEnd' | 'onCallTransfer' | 'onMissedCall' | 'onDTMFInput' | 'onKeywordDetected' | 'duringCall' | 'onEmailReceived' | 'onAPICall' | 'onContactCreated' | 'onCompanyCreated' | 'onDealCreated' | 'onTicketCreated' | 'onPropertyChange' | 'onWooCommerce' | 'onYubotoPbxChannelHangup' | 'onYubotoPbxChannelAnswer' | 'onYubotoPbxChannelCreate' | 'onCampaignLeadStatusChanged' | 'onShopifyEvent' | 'onLeadReceived': Trigger type (includes call, messaging, API, and integration triggers)
  - `triggerId` string: Trigger ID
  - `workflowVersionId` string: Saved workflow version to run instead of the live workflow
  - `dryRunNotifications` boolean: When true, email/SMS/Viber nodes preview resolved recipients/content without sending

## Response `200`

Workflow run successfully

- object
  - `roomId` string: WebSocket room ID to subscribe to for real-time updates (only present if useWebsocket is true)

## Other responses

- `401`: Unauthorized
- `403`: Invalid CSRF
- `429`: Rate limit exceeded
- `500`: Internal Server Error

---

[API](https://skmtc.dev/voicelogica/apis/voice-logica-api.md) · [All operations](https://skmtc.dev/voicelogica/apis/voice-logica-api/llms.txt) · [OpenAPI document](https://skmtc.dev/voicelogica/apis/voice-logica-api/revisions/30f76840084e?raw)
