curl --location 'https://api.weya.live/backend/api/call/batches/64e5f12345abcdef12345678?page=1&limit=10&channel_type=voice&search=Marketing' \
--header 'x-api-key: YOUR_API_KEY'
{
"status": true,
"code": 200,
"message": "Batches fetched successfully",
"errorMessage": null,
"data": {
"batches": [
{
"_id": "64e5f12345abcdef98765432",
"batchName": "Marketing Campaign May 2025",
"type": "outbound",
"queue_status": "in-progress",
"totalCalls": 150,
"callsPicked": 120,
"callsCompleted": 100,
"callStats": {
"leads": 150,
"leadsConnected": 96,
"connectivityPct": 64,
"dials": 210,
"basis": "lead",
"legacy": { "totalCalls": 150, "callsPicked": 120, "callsCompleted": 100 }
},
"createdAt": "2025-05-01T12:00:00.000Z",
"updatedAt": "2025-05-15T14:30:00.000Z"
}
],
"pagination": {
"total": 25,
"page": "1",
"limit": "10",
"totalPages": 3,
"hasNextPage": true,
"hasPrevPage": false
}
}
}
Campaign Management
Get Campaigns
Retrieve a paginated list of your campaigns, with search and status filters.
GET
/
api
/
call
/
batches
/
{userId}
curl --location 'https://api.weya.live/backend/api/call/batches/64e5f12345abcdef12345678?page=1&limit=10&channel_type=voice&search=Marketing' \
--header 'x-api-key: YOUR_API_KEY'
{
"status": true,
"code": 200,
"message": "Batches fetched successfully",
"errorMessage": null,
"data": {
"batches": [
{
"_id": "64e5f12345abcdef98765432",
"batchName": "Marketing Campaign May 2025",
"type": "outbound",
"queue_status": "in-progress",
"totalCalls": 150,
"callsPicked": 120,
"callsCompleted": 100,
"callStats": {
"leads": 150,
"leadsConnected": 96,
"connectivityPct": 64,
"dials": 210,
"basis": "lead",
"legacy": { "totalCalls": 150, "callsPicked": 120, "callsCompleted": 100 }
},
"createdAt": "2025-05-01T12:00:00.000Z",
"updatedAt": "2025-05-15T14:30:00.000Z"
}
],
"pagination": {
"total": 25,
"page": "1",
"limit": "10",
"totalPages": 3,
"hasNextPage": true,
"hasPrevPage": false
}
}
}
Overview
List the campaigns created by the user who owns the API key. Deleted campaigns are never returned. Results are paginated and sorted by last update, newest first.Prerequisites
- An API key for your workspace
Request
Your user ID. The path needs a value, but it isn’t used to filter: campaigns are always returned for the user who owns the API key.
Case-insensitive text matched against the campaign name and
queue_status. Partial matches are returned.Only return campaigns of this channel:
voice, video, whatsapp or web_chat. If omitted, campaigns of every channel are returned.Filter by a group of statuses. What each value matches depends on
channel_type:- Voice (or
channel_typeomitted):active–in-progress, pluscompletedcampaigns updated in the last 2 hours.in-progresscampaigns are listed first.inactive–pending,paused,freezedorfailed.completed–completedcampaigns last updated more than 2 hours ago.
- Video and web chat:
active(link not revoked) orinactive(link revoked). - WhatsApp:
activeorinactive.
curl --location 'https://api.weya.live/backend/api/call/batches/64e5f12345abcdef12345678?page=1&limit=10&channel_type=voice&search=Marketing' \
--header 'x-api-key: YOUR_API_KEY'
Response
{
"status": true,
"code": 200,
"message": "Batches fetched successfully",
"errorMessage": null,
"data": {
"batches": [
{
"_id": "64e5f12345abcdef98765432",
"batchName": "Marketing Campaign May 2025",
"type": "outbound",
"queue_status": "in-progress",
"totalCalls": 150,
"callsPicked": 120,
"callsCompleted": 100,
"callStats": {
"leads": 150,
"leadsConnected": 96,
"connectivityPct": 64,
"dials": 210,
"basis": "lead",
"legacy": { "totalCalls": 150, "callsPicked": 120, "callsCompleted": 100 }
},
"createdAt": "2025-05-01T12:00:00.000Z",
"updatedAt": "2025-05-15T14:30:00.000Z"
}
],
"pagination": {
"total": 25,
"page": "1",
"limit": "10",
"totalPages": 3,
"hasNextPage": true,
"hasPrevPage": false
}
}
}
Campaign status. For voice campaigns:
pending, in-progress, paused, freezed (outside the calling window), completed or failed.Per-contact call statistics for the campaign’s whole history. They are updated every few minutes, so recent calls may not be counted yet. Missing when no statistics are available yet.
leads– contacts counted in the statisticsleadsConnected– of those, contacts with a connected callconnectivityPct–leadsConnectedas a percentage ofleadsdials– total call attemptsbasis– alwaysleadlegacy– thetotalCalls,callsPickedandcallsCompletedcounters
Pagination details:
total, page, limit, totalPages, hasNextPage and hasPrevPage. page and limit are returned as strings when you pass them in the query.Error Handling
- 401 Unauthorized – Missing or invalid API key.
- 500 Internal Server Error – Unexpected server error.
200 with an empty batches array.
Use
GET /api/call/batch-details/{batchId} to get the details and calls of one campaign.Was this page helpful?

