Skip to main content
POST

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

string
required
Your workspace API key. Create one from the profile menu in the dashboard → API Keys.
string
required
Unique identifier of the campaign to pause.
This endpoint takes no request body.

Response

boolean
required
Indicates whether the campaign was paused.
integer
required
HTTP status code.
string
required
Human-readable success message.
string
ID of the paused campaign.
string
Name of the paused campaign.
string
New campaign status: paused.

Error Handling

Errors return status: false, with the reason in errorMessage.
  • 400 Bad Request
    • Invalid Batch ID – batchId is not a valid ID.
    • Batch is already paused
    • Batch is completed and cannot be paused (or failed).
    • 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.