Skip to main content
POST
/
workflows
Create a workflow
curl --request POST \
  --url https://api.dialnexa.com/v1/workflows \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "Lead Nurture Sequence",
  "description": "Contacts cold leads three times before marking as unresponsive.",
  "status": "draft"
}
'
{
  "id": "wf_abc123",
  "organization_id": "org_xyz",
  "title": "Lead Nurture Sequence",
  "description": "Contacts cold leads three times before marking as unresponsive.",
  "status": "active",
  "created_at": "2024-03-01T09:00:00.000Z",
  "updated_at": "2024-03-02T11:00:00.000Z"
}
A workflow is a sequence of steps (nodes) connected by transitions (edges) that a lead moves through over time. Each node can be a voice call, a time delay, a conditional branch, or an application action. The outcome of each step determines which path the lead takes next.

When to use workflows

Workflows are ideal for:
  • Lead nurture sequences: Call a lead, wait 2 days, call again if no answer, then mark them as unresponsive after 3 attempts.
  • Re-engagement drips: Try a prospect twice, then route them to a different agent script if there is still no answer.
  • Conditional follow-ups: After a first call, if the lead said “interested”, route them to a booking agent; if they said “not interested”, mark them as closed.

Workflow vs. campaign

CampaignWorkflow
StructureFlat, where all leads get the same callsMulti-step with conditional branching
Lead progressLinearMoves through nodes based on outcomes
Best forSimple bulk outreachDrip sequences and decision-tree calling

Getting started

  1. Create the workflow with this endpoint.
  2. Add nodes via Create Node, with one node per step.
  3. Connect nodes via Create Edge to define transitions.
  4. Enrol leads via Add Workflow Lead.
  5. Activate the workflow via Activate.

Request

curl "https://api.dialnexa.com/v1/workflows" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{...}'

Response

{
  "id": "wfl_m3v7zb9rk2px",
  "name": "30-Day Lead Nurture",
  "status": "active",
  "node_count": 5,
  "edge_count": 6,
  "enrolled_leads": 420,
  "created_at": "2024-04-01T08:00:00.000Z"
}

Authorizations

Authorization
string
header
required

Pass your API key as a Bearer token in the Authorization header.

Body

application/json
title
string
required

Workflow name.

Maximum string length: 100
Example:

"Lead Nurture Sequence"

description
string
Example:

"Contacts cold leads three times before marking as unresponsive."

status
enum<string>
default:draft
Available options:
draft,
active,
paused,
completed,
cancelled

Response

201 - application/json

Created.

id
string
Example:

"wf_abc123"

organization_id
string
Example:

"org_xyz"

title
string
Example:

"Lead Nurture Sequence"

description
string | null
Example:

"Contacts cold leads three times before marking as unresponsive."

status
enum<string>

Workflow lifecycle status. Responses can include running for older workflow records; treat it like active. Use active in new create or update requests.

Available options:
draft,
active,
running,
paused,
completed,
cancelled
Example:

"active"

created_at
string<date-time>
Example:

"2024-03-01T09:00:00.000Z"

updated_at
string<date-time>
Example:

"2024-03-02T11:00:00.000Z"