> ## Documentation Index
> Fetch the complete documentation index at: https://dialnexa.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Workflow Lead History

> Fetch the node-by-node execution history for one workflow lead.

<span data-api-safety-label="read-only"><Badge color="gray" size="sm" shape="pill">Read only</Badge></span>

<Info>
  **Recommended.** This endpoint is part of the public `/v1` API reference and is the supported path for new integrations. See the [migration guide](/docs/api-reference/v1/migrating-to-v1) for versioning guidance.
</Info>

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](/docs/api-reference/call-logs/get-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](/docs/api-reference/v1/workflow-leads/list). For the call log of a specific voice-call step, use the `call_id` returned by this endpoint with [Get Call Details](/docs/api-reference/call-logs/get-details).

## Path parameters

| Parameter    | Description                                                        |
| ------------ | ------------------------------------------------------------------ |
| `workflowId` | The workflow ID, for example `wfl_m3v7zb9rk2px`.                   |
| `id`         | The workflow-lead enrollment ID, for example `wlead_p3q8zv5bk2mx`. |

## Errors

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

## Related endpoints

* [List Workflow Leads](/docs/api-reference/v1/workflow-leads/list): see every lead in the workflow.
* [Get Call Details](/docs/api-reference/call-logs/get-details): full transcript for the `call_id` returned above.
* [Get Workflow Details](/docs/api-reference/v1/workflows/get): workflow summary alongside per-lead drill-downs.
* [List Nodes](/docs/api-reference/workflow-nodes/list): fetch node definitions referenced in the history.


## OpenAPI

````yaml GET /v1/workflows/{workflowId}/leads/{id}/history
openapi: 3.0.0
info:
  title: DialNexa API
  description: >-
    Public REST API for the DialNexa voice AI platform. Versioned endpoints are
    under /v1; unversioned endpoints are legacy and deprecated.
  version: 1.0.0
servers:
  - url: https://api.dialnexa.com
    description: DialNexa production API
security:
  - bearer: []
tags:
  - name: API Keys
  - name: Agent Functions
  - name: Agents V1
  - name: Agents2
  - name: Batch Calls
  - name: Batch Calls V1
  - name: Call Logs
  - name: Calls
  - name: Calls V1
  - name: Campaign Leads
  - name: Campaigns
  - name: External Webhooks
  - name: Knowledge Base
  - name: Knowledge Base V1
  - name: LLMs
  - name: LLMs V1
  - name: Languages
  - name: Languages V1
  - name: Organization Phone Numbers
  - name: Organization Phone Numbers V1
  - name: Phone Number Pricing
  - name: Phone Number Pricing V1
  - name: Transcribers
  - name: Transcribers V1
  - name: User Webhooks
  - name: User Webhooks V1
  - name: V1
  - name: Voices
  - name: Voices V1
  - name: Webcall
  - name: Workflow Leads
  - name: Workflow Leads V1
  - name: Workflows
  - name: Workflows V1
paths:
  /v1/workflows/{workflowId}/leads/{id}/history:
    get:
      tags:
        - Workflow Leads V1
        - V1
      summary: Get Lead Execution History
      description: Returns node-by-node execution history for one workflow lead.
      operationId: WorkflowLeadsV1Controller_getLeadHistory
      parameters:
        - name: workflowId
          required: true
          in: path
          description: Workflow ID
          schema:
            type: string
            example: workflow_abc123
        - name: id
          required: true
          in: path
          description: Lead ID
          schema:
            type: string
            example: lead_abc123
      responses:
        '200':
          description: Lead execution history returned successfully.
          content:
            application/json:
              examples:
                success:
                  summary: Successful response
                  value:
                    statusCode: 200
                    message: Lead history fetched successfully
                    data:
                      lead:
                        id: lead_abc123
                        phone_number: '+919876543210'
                        dynamic_variables:
                          customer_name: Priya Sharma
                          loan_amount: '500000'
                        status: pending
                        createdAt: '2026-07-03T10:30:00.000Z'
                      history:
                        - node_id: node_start
                          node_type: VOICE_CALL
                          label: Initial call
                          status: completed
                          call_id: call_abc123
                          started_at: '2026-07-03T10:30:00.000Z'
                          ended_at: '2026-07-03T10:32:00.000Z'
        '401':
          description: Unauthorized - missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                error:
                  summary: 401 Unauthorized
                  value:
                    statusCode: 401
                    message: API key is missing or invalid
                    error: Unauthorized
        '403':
          description: Forbidden - workflow does not belong to your organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                error:
                  summary: 403 Forbidden
                  value:
                    statusCode: 403
                    message: You do not have permission to access this workflow
                    error: Forbidden
        '404':
          description: Lead not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                error:
                  summary: 404 Not Found
                  value:
                    statusCode: 404
                    message: Workflow lead not found
                    error: Not Found
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                error:
                  summary: 500 Internal Server Error
                  value:
                    statusCode: 500
                    message: Internal server error
                    error: Internal Server Error
      security:
        - bearer: []
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        statusCode:
          type: integer
          example: 400
        message:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
          example: phone_number must be a valid E.164 phone number
        error:
          type: string
          example: Bad Request
      required:
        - statusCode
        - message
        - error
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````