curl --location --request POST 'https://api.weya.live/backend/api/call/pause-batch/6806382f98da85ec32fac955' \
--header 'x-api-key: YOUR_API_KEY'
{
"status": true,
"code": 200,
"message": "Batch paused successfully",
"errorMessage": null,
"data": {
"batchId": "6806382f98da85ec32fac955",
"batchName": "Sales Campaign - July",
"status": "paused"
}
}
Campaign Management
Pause Campaign
Stop a running campaign from starting new calls. Calls already in progress finish normally.
POST
/
api
/
call
/
pause-batch
/
{batchId}
curl --location --request POST 'https://api.weya.live/backend/api/call/pause-batch/6806382f98da85ec32fac955' \
--header 'x-api-key: YOUR_API_KEY'
{
"status": true,
"code": 200,
"message": "Batch paused successfully",
"errorMessage": null,
"data": {
"batchId": "6806382f98da85ec32fac955",
"batchName": "Sales Campaign - July",
"status": "paused"
}
}
Overview
Pause a running campaign. While paused, no new calls are started; calls that are already connected finish normally. Resume it later with Resume Campaign. A campaign must be paused before you can change its settings with Update Campaign.Prerequisites
- An API key for your workspace
- The campaign’s
batchId. The campaign must have been created by the user who owns the API key. - The campaign is not already paused, and is not completed or failed.
Endpoint
Request
This endpoint takes no request body.curl --location --request POST 'https://api.weya.live/backend/api/call/pause-batch/6806382f98da85ec32fac955' \
--header 'x-api-key: YOUR_API_KEY'
Response
{
"status": true,
"code": 200,
"message": "Batch paused successfully",
"errorMessage": null,
"data": {
"batchId": "6806382f98da85ec32fac955",
"batchName": "Sales Campaign - July",
"status": "paused"
}
}
Error Handling
Errors returnstatus: false, with the reason in errorMessage.
- 400 Bad Request
Invalid Batch ID–batchIdis not a valid ID.Batch is already pausedBatch is completed and cannot be paused(orfailed).Batch state changed during pause; please retry– the campaign’s status changed while it was being paused. Send the request again.
- 401 Unauthorized – Missing or invalid API key.
- 404 Not Found – No campaign with this ID was created by the user who owns the API key, or it was deleted.
- 500 Internal Server Error – Unexpected server error.
After pausing a campaign, you can:
PUT /api/call/update-batch/{batchId}to change its settings or add calls.POST /api/call/resume-batch/{batchId}to start calling again.
Was this page helpful?

