Skip to main content
POST
Create a workflow run: one agent conducting one workflow on one lead. Get the agentId from List Agents and the workflowId from List Workflows. Depending on the workflow’s type, the agent may begin sending messages to the lead.

Authentication

Requires the x-api-key header with a valid workspace API key.

Body Parameters

string
required
The lead the workflow is conducted on.
string
required
The agent that conducts the workflow.
string
required
The workflow the agent conducts.
string
A portal URL for this run. When set, this link is sent to the lead instead of the lead’s existing portal link or the workflow’s portal URL template. Must be a valid URL.
string
An identifier for this run in your own system (e.g. from a CRM). It is returned on the run and carried inside workflowRun on every workflow_run.* webhook, so you can match events to your own records before you have stored our id. It does not have to be unique: several runs may share one, for example when you start a new run for the same record after an earlier one was cancelled. At most 255 characters.
No other fields are accepted.

Response

boolean
Whether the request succeeded.
object
The new workflow run. See Get Workflow Run for the full shape. A new workflow run is always ACTIVE.

Errors

error
leadId, agentId, or workflowId is missing, or the body carries an unrecognized field.
error
The leadId, agentId, or workflowId isn’t in your workspace.
error
The workflow run cannot be created:
  • Agent is already linked to this lead: this agent already has an open (ACTIVE or PAUSED) workflow run on this lead. Cancel or complete it first, or use a different agent.
  • … already collects this lead's checklist: a lead can have only one open CHECKLIST workflow run at a time.
  • This reminder workflow has no schedule configured yet: the REMINDER workflow needs a schedule set in the Monumint app first.