workflows
Manually start a workflow run
Kick off a run without waiting for an inbound message (useful for testing). Target an existing conversation by conversationId, or — WhatsApp only — a phone number via to (a conversation is found or created). text seeds the run's lastMessage variable. The graph must be runnable.
AuthorizationBearer <token>
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
workflowIdstring
to?string
Recipient phone (WhatsApp only)
conversationId?string
An existing conversation to run in (required for non-WhatsApp workflows)
text?string
Simulated inbound text
Response Body
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.workflows.triggerWorkflow({ path: { workflowId: 'workflow_abc123', }, body: { to: 'string', conversationId: 'conversation_abc123', text: 'Hello, world!', },});console.log(data);{
"success": true,
"execution": {
"id": "string",
"status": "string",
"currentNodeId": "string",
"waitingFor": {},
"variables": {},
"conversationId": "string"
}
}Empty
{
"error": "Unauthorized"
}{
"error": "Not found"
}