Batch calls
The batchCalls resource runs bulk outbound phone campaigns. Upload a recipients file, then launch or schedule the campaign.
Upload recipients
upload reads a .csv, .xls, or .xlsx file (max 5 MB), uploads it, and waits for parsing, returning the parsed batch.
- Node.js
- Go
const batch = await client.batchCalls.upload({ filePath: "./leads.csv" });
batch, err := client.BatchCalls.Upload(ctx, videosdk.UploadBatchCallParams{FilePath: "./leads.csv"})
Options: filePath (required), batchId (replace the file on an existing batch), waitForParse (default true), poll interval / timeout, an onParsing hook.
Create a campaign
- Node.js
- Go
const campaign = await client.batchCalls.create({
batchName: "Q3 outreach",
phoneNumberId: "pn_1",
routingRuleId: "rr_1",
batchId, // from upload
timing: "scheduled",
scheduledDate: "2026-07-01",
scheduledTime: "09:30",
});
campaign, err := client.BatchCalls.Create(ctx, videosdk.CreateBatchCallParams{
BatchName: "Q3 outreach",
PhoneNumberID: "pn_1",
RoutingRuleID: "rr_1",
BatchID: batchID, // from upload
Timing: videosdk.BatchCallScheduled,
ScheduledDate: "2026-07-01",
ScheduledTime: "09:30",
})
Required: batchName, phoneNumberId, routingRuleId. Scheduling: timing (immediate or scheduled), timezone, scheduledDate / scheduledTime, allowedFrom / allowedUntil, daysOfWeek. Also retry, webhook, saveAsDraft.
Manage a campaign
- Node.js
- Go
await client.batchCalls.list({ status: "running" });
await client.batchCalls.get(batchId);
await client.batchCalls.update(batchId, { scheduledTime: "10:00" });
await client.batchCalls.cancel(batchId, "graceful"); // or "immediate"
await client.batchCalls.delete(batchId);
await client.batchCalls.stats(batchId);
client.BatchCalls.List(ctx, videosdk.ListBatchCallsParams{Status: videosdk.BatchStatusRunning})
client.BatchCalls.Get(ctx, batchID)
client.BatchCalls.Update(ctx, batchID, videosdk.UpdateBatchCallParams{ScheduledTime: videosdk.String("10:00")})
client.BatchCalls.Cancel(ctx, batchID, videosdk.BatchCancelGraceful) // or BatchCancelImmediate
client.BatchCalls.Delete(ctx, batchID)
client.BatchCalls.Stats(ctx, batchID)
Records
- Node.js
- Go
await client.batchCalls.listRecords(batchId, { status: "not connected" });
await client.batchCalls.updateRecord(batchId, recordId, { phoneNumber: "+14155550123" });
await client.batchCalls.deleteRecords(batchId, [recordId]);
const csv = await client.batchCalls.exportRecords(batchId); // CSV text
client.BatchCalls.ListRecords(ctx, batchID, videosdk.ListBatchCallRecordsParams{Status: "not connected"})
client.BatchCalls.UpdateRecord(ctx, batchID, recordID, videosdk.UpdateBatchCallRecordParams{PhoneNumber: videosdk.String("+14155550123")})
client.BatchCalls.DeleteRecords(ctx, batchID, []string{recordID})
csv, err := client.BatchCalls.ExportRecords(ctx, batchID, videosdk.ExportBatchCallRecordsParams{}) // CSV text
Got a Question? Ask us on discord

