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

# Get Batch Statistics (Overall Progress)

> Retrieves high-level statistics for a batch from persistent storage. This is a lightweight call to check the overall progress of your campaign.



## OpenAPI

````yaml get /api/v1/batch/check-status
openapi: 3.0.3
info:
  title: Dialgen API
  description: >-
    Dialgen API allows you to programmatically initiate and monitor AI-powered
    voice calls, either one at a time or in high-volume batches.
  version: 1.0.0
  contact:
    name: Dialgen Support
    url: https://sa.dialgen.ai
servers:
  - url: https://sa.dialgen.ai
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: Agents
    description: Operations related to AI agents
  - name: Calls
    description: Operations related to individual calls
  - name: Batches
    description: Operations related to batch campaigns
paths:
  /api/v1/batch/check-status:
    get:
      tags:
        - Batches
      summary: Get Batch Statistics (Overall Progress)
      description: >-
        Retrieves high-level statistics for a batch from persistent storage.
        This is a lightweight call to check the overall progress of your
        campaign.
      operationId: getBatchStats
      parameters:
        - name: batchId
          in: query
          description: The ID returned from POST /api/v1/batch
          required: true
          schema:
            type: string
            example: batch_1678886400_agent_clx123...
        - name: limit
          in: query
          description: >-
            Number of recent calls to return. Defaults to 10. Use 'all' or '-1'
            to return all calls in the batch.
          required: false
          schema:
            type: string
            default: '10'
            example: '20'
      responses:
        '200':
          description: Batch statistics retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchStatsResponse'
              example:
                batchId: batch_1767385567962_...
                status: completed
                priority: 5
                statistics:
                  total: 1
                  processed: 1
                  succeeded: 1
                  failed: 0
                  pending: 0
                  percentComplete: 100
                  successRate: 100
                performance:
                  callsPerSecond: 0.01
                  estimatedTimeRemaining: null
                  elapsedTime: 72
                timestamps:
                  createdAt: '2026-01-02T20:27:34.060Z'
                  startedAt: '2026-01-02T20:27:34.059Z'
                  completedAt: '2026-01-02T20:28:46.214Z'
                recentCalls:
                  - id: cmjxbsai4001...
                    callSid: CA123...
                    status: COMPLETED
                    duration: 46
                    createdAt: '2026-01-02T20:27:34.060Z'
                    phoneNumber: '+1234567890'
                    contactName: John Doe
                webhooks: null
                agentId: cmghxkg2p...
                userId: user_33m...
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    BatchStatsResponse:
      type: object
      properties:
        batchId:
          type: string
        status:
          type: string
          enum:
            - ingesting
            - scheduled
            - pending
            - processing
            - completed
            - cancelled
        priority:
          type: number
        statistics:
          type: object
          properties:
            total:
              type: number
            processed:
              type: number
            succeeded:
              type: number
            failed:
              type: number
            pending:
              type: number
            percentComplete:
              type: number
            successRate:
              type: number
        performance:
          type: object
          properties:
            callsPerSecond:
              type: number
            estimatedTimeRemaining:
              type: number
              nullable: true
            elapsedTime:
              type: number
        timestamps:
          type: object
          properties:
            createdAt:
              type: string
              format: date-time
            startedAt:
              type: string
              format: date-time
            completedAt:
              type: string
              format: date-time
              nullable: true
        recentCalls:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              callSid:
                type: string
              status:
                type: string
              duration:
                type: number
              createdAt:
                type: string
                format: date-time
              phoneNumber:
                type: string
              contactName:
                type: string
        webhooks:
          type: object
          nullable: true
        agentId:
          type: string
        userId:
          type: string
    Error:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
        message:
          type: string
        details:
          type: object
  responses:
    BadRequest:
      description: Missing or invalid fields/parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Bad Request
            message: Missing required parameter
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Unauthorized
            message: Invalid or missing API key
    NotFound:
      description: The requested resource was not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Not Found
            message: Resource not found
    InternalServerError:
      description: An unexpected server error occurred
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Internal Server Error
            message: An unexpected error occurred
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer token authentication. Obtain your API key from the Dialgen API
        Keys dashboard at https://sa.dialgen.ai/api-keys

````