Skip to main content
GET
/
workflows
/
{workflowId}
/
leads
/
{id}
/
history
Get lead history in a workflow
curl --request GET \
  --url https://api.dialnexa.com/v1/workflows/{workflowId}/leads/{id}/history \
  --header 'Authorization: Bearer <token>'
{
  "id": "wflead_abc",
  "workflow_id": "wf_abc123",
  "history": [
    {
      "node_id": "node_abc",
      "node_label": "Initial Outreach Call",
      "node_type": "VOICE_CALL",
      "status": "no_answer",
      "call_id": "call_aaa",
      "entered_at": "2024-03-01T10:00:00.000Z",
      "exited_at": "2024-03-01T10:00:45.000Z"
    },
    {
      "node_id": "node_time",
      "node_label": "Wait 2 hours",
      "node_type": "TIME",
      "status": "completed",
      "call_id": null,
      "entered_at": "2024-03-01T10:00:45.000Z",
      "exited_at": "2024-03-01T12:00:45.000Z"
    },
    {
      "node_id": "node_xyz",
      "node_label": "Follow-up Call",
      "node_type": "VOICE_CALL",
      "status": "completed",
      "call_id": "call_bbb",
      "entered_at": "2024-03-01T12:00:45.000Z",
      "exited_at": "2024-03-01T12:03:10.000Z"
    }
  ]
}
Returns the complete history of a single lead’s path through the workflow. Each entry records a node the lead entered: the node_id, the node_type, the human-readable label, the start and end timestamps, the per-step status, and, for VOICE_CALL nodes, the call_id so you can pivot into Get Call Details to inspect the transcript. Use this endpoint for per-lead debugging, quality review, and rendering a timeline view in your dashboard.

When to use this

  • Debugging a stuck lead: confirm which node the lead is waiting on and how long it has been there.
  • Quality review: produce a per-lead timeline for compliance or operations reviewers.
  • Drill-down from a dashboard: pivot from a workflow lead row into the full path the lead took.
  • Reporting on path coverage: sample lead histories to confirm conditional branches are being followed as expected.
For aggregate lead progress across the workflow, use List Workflow Leads. For the call log of a specific voice-call step, use the call_id returned by this endpoint with Get Call Details.

Path parameters

ParameterDescription
workflowIdThe workflow ID, for example wfl_m3v7zb9rk2px.
idThe workflow-lead enrollment ID, for example wlead_p3q8zv5bk2mx.

Response shape

Each entry in the history array represents one node visit, with at least:
  • node_id, node_type, label: the node visited.
  • status: the per-step status (for example completed, waiting, failed).
  • started_at: when the lead entered the node.
  • ended_at (or ends_at for waiting nodes): when the lead left the node.
  • call_id: present for VOICE_CALL nodes; pivot into the call log via this ID.

Errors

  • 404 Not Found is returned when the workflow or lead does not exist, or the lead is not enrolled in the workflow.

Request

curl "https://api.dialnexa.com/v1/workflows/wfl_m3v7zb9rk2px/leads/wlead_p3q8zv5bk2mx/history" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "lead_id": "wlead_p3q8zv5bk2mx",
  "history": [
    {
      "node_id": "node_v8p3kz1mq7ry",
      "node_type": "VOICE_CALL",
      "label": "First Outreach Call",
      "status": "completed",
      "call_id": "call_x9y3zp4mq7r1",
      "started_at": "2024-05-01T09:05:00.000Z",
      "ended_at": "2024-05-01T09:07:22.000Z"
    },
    {
      "node_id": "node_t2n6bw4pq9rz",
      "node_type": "TIME",
      "label": "Wait 48 Hours",
      "status": "waiting",
      "started_at": "2024-05-01T09:07:22.000Z",
      "ends_at": "2024-05-03T09:07:22.000Z"
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Path Parameters

workflowId
string
required
id
string
required

Response

200 - application/json

Success.

id
string
Example:

"wflead_abc"

workflow_id
string
Example:

"wf_abc123"

history
object[]
Example:
[
  {
    "node_id": "node_abc",
    "node_label": "Initial Outreach Call",
    "node_type": "VOICE_CALL",
    "status": "no_answer",
    "call_id": "call_aaa",
    "entered_at": "2024-03-01T10:00:00.000Z",
    "exited_at": "2024-03-01T10:00:45.000Z"
  },
  {
    "node_id": "node_time",
    "node_label": "Wait 2 hours",
    "node_type": "TIME",
    "status": "completed",
    "call_id": null,
    "entered_at": "2024-03-01T10:00:45.000Z",
    "exited_at": "2024-03-01T12:00:45.000Z"
  },
  {
    "node_id": "node_xyz",
    "node_label": "Follow-up Call",
    "node_type": "VOICE_CALL",
    "status": "completed",
    "call_id": "call_bbb",
    "entered_at": "2024-03-01T12:00:45.000Z",
    "exited_at": "2024-03-01T12:03:10.000Z"
  }
]