> ## 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.

# List Workflow Leads

> List workflow leads with optional pagination, current execution status, and the total number of matching leads.

Read only
List workflow leads to retrieve enrolled contacts, newest first, in `data.data`. The response includes the number of leads returned in `data.count` and the total number matching your filter in `data.total`. Each entry includes the signed lead `id`, the contact `phone_number` as written in the uploaded file, `dynamic_variables` (an array of `key` and `value` pairs, one per non-empty data cell; blank cells add no entry), `notes`, `tags`, the raw `workflow_id`, and timestamps, plus the lead's latest execution:

* `status`: `pending` (not started yet), `active`, `completed`, `dropped`, `failed`, or `dnc_blocked` (stopped because the number is on the workspace's DNC list).
* `current_node_id`, `entry_time` and `completed_at`: null while the lead is `pending`.

Use this to monitor live progress through the sequence, build operational dashboards, and detect leads that need review.

## When to use this

* **Workflow dashboards**: render an enrollment table with each lead's current step.
* **Stall detection**: find leads whose `current_node_id` has not changed in the expected time window and flag them for review.
* **Compliance audits**: enumerate enrolled leads to demonstrate which contacts were dialled in a given period.
* **CRM sync**: write back the per-lead status to the originating CRM record.

For a single lead's full step-by-step history, use [Lead History](https://dialnexa.com/docs/api-reference/v1/workflow-leads/history.md). To review calls produced by enrolled leads in the dashboard, use [Call History](https://dialnexa.com/docs/monitoring/call-history.md).

## Path parameters

| Parameter | Description |
| - | - |
| `workflowId` | The workflow ID, for example `workflow_m3v7zb9rk2px4q`. |

## Query parameters

| Parameter | Description |
| - | - |
| `leadIds` | Optional comma-separated lead IDs to filter, for example `lead_abc123,lead_def456`. |
| `page` | 1-based page number. Omit page and limit to return every lead, as before. |
| `limit` | Leads per page; defaults to 50. Values above 200 use 200. Applies only when paging is requested. |

## List workflow leads with pagination

Send `page=1&limit=50` to retrieve the first page. Supplying either `page` or `limit` enables pagination; omit both to retrieve every matching lead. The page number defaults to 1, and the page size defaults to 50. Invalid or non-positive values use these defaults. Fractional values are truncated to whole numbers, and page sizes above 200 use 200.

To verify a paginated response, compare `data.count` with the number of entries in `data.data`. Use `data.total` to determine how many matching leads remain across all pages. For a page beyond the available results, the list is empty while the total still describes all matching leads.

## Errors

* An unknown workflow ID is not an error: the response is `200` with an empty list.
* `401 Unauthorized` is returned when the API key is missing or invalid.

## Related endpoints

* [Upload Workflow Leads](https://dialnexa.com/docs/api-reference/v1/workflow-leads/add.md): upload leads from a CSV or Excel file.
* [Remove Workflow Lead](https://dialnexa.com/docs/api-reference/v1/workflow-leads/delete.md): remove a lead from the workflow.
* [Lead History](https://dialnexa.com/docs/api-reference/v1/workflow-leads/history.md): see every step a lead has moved through.
* [Get Variable Keys](https://dialnexa.com/docs/api-reference/v1/workflow-leads/variable-keys.md): see which dynamic variables this workflow's leads can carry.


## OpenAPI

````yaml GET /v1/workflows/{workflowId}/leads
openapi: 3.0.0
info:
  title: DialNexa API
  description: Public `/v1` REST API for the DialNexa voice AI platform.
  version: 1.0.0
servers:
  - url: https://api.dialnexa.com
    description: DialNexa production API
security:
  - bearer: []
tags:
  - name: Agents
  - name: Batch Calls
  - name: Calls
  - name: Knowledge Base
  - name: Languages
  - name: LLMs
  - name: Phone Numbers
  - name: Organization Folders
  - name: Transcribers
  - name: Webhooks
  - name: Voices
  - name: Workflows
  - name: Workflow Leads
  - name: Authentication
  - name: Agent Builder
  - name: Agent Evaluations
paths:
  /v1/workflows/{workflowId}/leads:
    get:
      tags:
        - Workflow Leads
      summary: List Workflow Leads
      description: >-
        Returns the leads enrolled in one workflow, newest first, with each
        lead's latest execution status. An unknown workflow ID returns an empty
        list.
      operationId: listWorkflowLeads
      parameters:
        - name: workflowId
          required: true
          in: path
          description: Workflow ID
          schema:
            type: string
            example: workflow_abc123
        - name: leadIds
          required: false
          in: query
          description: Comma-separated lead IDs to filter
          schema:
            example: lead_abc123,lead_def456
            type: string
        - name: page
          required: false
          in: query
          description: >-
            1-based page number. Omit page and limit to return every lead, as
            before.
          schema:
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: >-
            Leads per page (default 50, max 200). Only applies when paging is
            requested.
          schema:
            type: number
            example: 50
      responses:
        '200':
          description: Leads returned successfully.
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - error
                  - statusCode
                  - message
                  - data
                  - timestamp
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  error:
                    type: boolean
                    enum:
                      - false
                  statusCode:
                    type: integer
                    example: 200
                  message:
                    type: string
                    example: Success
                  data:
                    type: object
                    properties:
                      statusCode:
                        type: number
                        example: 200
                      message:
                        type: string
                        example: Leads fetched successfully
                      data:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              example: lead_abc123
                            workflow_id:
                              type: string
                              description: Raw workflow ID, without the workflow_ prefix.
                              example: Hk3pW9zQe1LmRt
                            organization_id:
                              type: string
                              example: o14XKPP84rt22g
                            phone_number:
                              type: string
                              description: As it appeared in the uploaded file.
                              example: '+919876543210'
                            dynamic_variables:
                              type: array
                              description: >-
                                One entry per non-empty data cell of the
                                uploaded file. Blank cells add no entry; values
                                are trimmed and inner whitespace is collapsed.
                              items:
                                type: object
                                properties:
                                  key:
                                    type: string
                                    example: customer_name
                                  value:
                                    type: string
                                    example: Priya Sharma
                                  fallback:
                                    type: string
                                required:
                                  - key
                                  - value
                            notes:
                              type: object
                              nullable: true
                              description: >-
                                The reserved notes column: a JSON object of at
                                most 15 keys, or plain text stored as {"text":
                                "<cell>"}.
                            tags:
                              type: array
                              nullable: true
                              items:
                                type: string
                                maxLength: 40
                              maxItems: 20
                              description: Null on leads uploaded before tags existed.
                            is_deleted:
                              type: boolean
                              example: false
                            status:
                              type: string
                              enum:
                                - pending
                                - active
                                - completed
                                - dropped
                                - failed
                                - dnc_blocked
                              example: active
                            current_node_id:
                              type: string
                              nullable: true
                            entry_time:
                              type: string
                              format: date-time
                              nullable: true
                            completed_at:
                              type: string
                              format: date-time
                              nullable: true
                            createdAt:
                              type: string
                              format: date-time
                            updatedAt:
                              type: string
                              format: date-time
                            created_at:
                              type: string
                              format: date-time
                            updated_at:
                              type: string
                              format: date-time
                      count:
                        type: number
                        example: 42
                      total:
                        type: integer
                        minimum: 0
                        description: >-
                          All leads matching the filter, across pages. count
                          remains the number returned on this page.
                  timestamp:
                    type: string
                    format: date-time
              examples:
                success:
                  summary: Successful response
                  value:
                    success: true
                    error: false
                    statusCode: 200
                    message: Success
                    data:
                      statusCode: 200
                      message: Leads fetched successfully
                      data:
                        - id: lead_abc123
                          workflow_id: Hk3pW9zQe1LmRt
                          organization_id: o14XKPP84rt22g
                          phone_number: '+919876543210'
                          dynamic_variables:
                            - key: customer_name
                              value: Priya Sharma
                            - key: loan_amount
                              value: '500000'
                          notes: null
                          tags:
                            - priority
                          is_deleted: false
                          status: active
                          current_node_id: Rt5vN8kQ2wLz7x
                          entry_time: '2026-07-03T10:31:00.000Z'
                          completed_at: null
                          createdAt: '2026-07-03T10:30:00.000Z'
                          updatedAt: '2026-07-03T10:30:00.000Z'
                          created_at: '2026-07-03T10:30:00.000Z'
                          updated_at: '2026-07-03T10:30:00.000Z'
                      count: 1
                      total: 1
                    timestamp: '2026-09-07T06:00: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
                    error: true
                    success: false
                    data: []
                    message: Invalid API key
                    errors: []
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                error:
                  summary: 500 Internal Server Error
                  value:
                    statusCode: 500
                    error: true
                    success: false
                    data: []
                    message: 'Error fetching workflow leads: Internal server error'
                    errors: []
      security:
        - bearer: []
components:
  schemas:
    ErrorResponse:
      type: object
      description: Error body on endpoints without response filtering.
      properties:
        statusCode:
          type: integer
          example: 404
        error:
          type: boolean
          enum:
            - true
        success:
          type: boolean
          enum:
            - false
        data:
          oneOf:
            - type: object
              properties:
                code:
                  type: string
                  description: Machine-readable refusal code.
            - type: array
              items: {}
          description: >-
            For a coded refusal, an object with code and the details listed for
            that code. Otherwise an empty array.
        message:
          type: string
        errors:
          type: array
          items:
            type: string
          description: Validation messages for a 400. Empty for other errors.
        validation_errors:
          type: array
          description: >-
            Present when uploaded rows fail number validation (batch and
            workflow lead uploads): one group per distinct error.
          items:
            type: object
            properties:
              error:
                type: string
              rows:
                type: array
                items:
                  type: integer
                description: Row numbers with this error.
              phone_numbers:
                type: array
                items:
                  type: string
        invalid_row_count:
          type: integer
          description: 'Present with validation_errors: how many rows failed.'
      required:
        - statusCode
        - error
        - success
        - data
        - message
        - errors
  securitySchemes:
    bearer:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.