Skip to main content
Retrieves high-level statistics for a batch. This is a lightweight call to check the overall progress of your campaign and remains available after the live status has expired from the cache.
  • Endpoint: GET /api/v1/batch/check-status
  • Method: GET
  • Query Parameters:
    • batchId (string, required): The ID returned from POST /api/v1/batch.
    • limit (string, optional): Number of recent calls to return. Defaults to 10. Use all or -1 to return all calls in the batch.
  • Example Request: GET /api/v1/batch/check-status?batchId=batch_1678886400...&limit=20
  • Success Response (200 OK):
    {
      "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..."
    }