Overview
Call this endpoint when you want to pause or end a campaign early. The batch status switches to stopped, preventing the dialer from launching additional calls. Existing conversations continue until they complete or hit agent-configured thresholds.
Prerequisites
- You know the
batchId you want to stop.
- The authenticated user owns or administrates the batch.
Request
Bearer token for an authorised workspace admin.
Batch identifier to halt.
Workspace user responsible for the batch. Used for auditing and scoping.
curl --location '{{baseUrl}}/api/call/stop-calling' \
--header 'Authorization: Bearer {{authToken}}' \
--header 'Content-Type: application/json' \
--data '{
"batchId": "64e5f12345abcdef98765432",
"userId": "64e5f12345abcdef12345678"
}'
Response
{
"message": "",
"status": true,
"code": 200,
"errorMessage": "",
"data": {
"batchId": "64e5f12345abcdef98765432",
"status": "stopped"
}
}
Indicates whether the batch was successfully stopped.
HTTP status code (200 for success).
Additional information about the stopped batch.
Error Handling
- 400 Bad Request – Missing required parameters (
batchId or userId).
- 401 Unauthorized – Bearer token missing or expired.
- 404 Not Found – Batch not found or user not found.
- 500 Internal Server Error – Failed to stop calling service or call queue; retry or contact support.
Stopping Behavior:
- Prevents new calls from being initiated for the batch
- In-flight calls are allowed to complete naturally
- The call queue is stopped to prevent new call processing
- Batch status is updated to reflect the stopped state
After stopping, verify the batch status using GET /api/call/batches/{userId} to confirm it shows as stopped.
Bearer token authentication for workspace access
Example:"64e5f12345abcdef98765432"
Example:"64e5f12345abcdef12345678"