Zernio
Zernio
API Reference

Workflows

Workflows

List workflowsGETCreate workflowPOSTGet workflow with graphGETUpdate workflowPATCHDelete workflowDELETEActivate workflowPOSTPause workflowPOSTDuplicate a workflowPOST

Runs

List workflow runsGETManually start a workflow runPOSTGet an execution's timelineGET

Versions

List a workflow's version historyGETGet a specific workflow versionGETRestore a workflow versionPOST

Other

Start an API-triggered workflowPOST
Dashboard
llms.txtOpenAPI
OverviewPlatformsAPI ReferenceResources
Workflows

Start an API-triggered workflow

Starts a run of an active workflow whose trigger type is api_call. Pass exactly one target: conversationId (a conversation on the workflow's account), contactId (resolved to that contact's conversation on the workflow's account), or to (WhatsApp workflows only: a phone number, whose conversation is found or created). variables are merged over the standard run variables, so each key is available as {{key}}.


POST
/v1/workflows/{workflowId}/trigger

Authorization

bearerAuth
AuthorizationBearer <token>

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

In: header

Path Parameters

workflowId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Exactly one of conversationId, contactId or to.

Response Body

application/json

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.triggerApiCallWorkflow({  path: {    workflowId: 'workflow_abc123',  },  body: {    conversationId: 'conversation_abc123',    contactId: 'contact_abc123',    to: 'string',  },});console.log(data);
{  "executionId": "string"}
Was this page helpful?

Restore a workflow version

Replace the current graph with the named version's snapshot. Before the swap, the current graph is itself snapshotted as a new version, so a restore is reversible. The workflow must be in `draft` or `paused` status (same gate as a normal graph edit). The returned workflow carries `restoredFromVersion` so the UI can surface which version was rolled back to.

List automation logs

Paginated list of every comment that triggered this automation, with send status and commenter info.

conversationId?string

A conversation on the workflow's account

contactId?string

A contact with a conversation on the workflow's account

to?string

Recipient phone in E.164 (WhatsApp workflows only)

variables?

Seed variables, merged over the standard run variables