> ## Documentation Index
> Fetch the complete documentation index at: https://docs.weya.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Pause Campaign

> Stop a running campaign from starting new calls. Calls already in progress finish normally.

## 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

**/api/call/pause-batch/\{batchId}**

## Request

**x-api-key** `string` *required*

Your workspace API key. Create one from the profile menu in the dashboard → **API Keys**.

**batchId** `string` *required*

Unique identifier of the campaign to pause.

This endpoint takes no request body.

```bash cURL theme={null}
curl --location --request POST 'https://api.weya.live/backend/api/call/pause-batch/6806382f98da85ec32fac955' \
  --header 'x-api-key: YOUR_API_KEY'
```

## Response

```json 200 OK theme={null}
{
  "status": true,
  "code": 200,
  "message": "Batch paused successfully",
  "errorMessage": null,
  "data": {
    "batchId": "6806382f98da85ec32fac955",
    "batchName": "Sales Campaign - July",
    "status": "paused"
  }
}
```

**status** `boolean` *required*

Indicates whether the campaign was paused.

**code** `integer` *required*

HTTP status code.

**message** `string` *required*

Human-readable success message.

**data.batchId** `string`

ID of the paused campaign.

**data.batchName** `string`

Name of the paused campaign.

**data.status** `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.

> [!TIP]
>
> 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.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.