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

# Update Campaign

> Update campaign configuration (auto-pauses campaign)

## Update Campaign

Update campaign configuration. **Important:** the campaign is automatically paused as the first step of every update, **before the request is validated**.

You must manually resume it after updating via `POST /api/campaigns/{id}/resume`.

> [!WARNING]
>
> Because the pause happens first, a request that is then **rejected** (for example `400` no fields provided, too many `notification_emails`, `concurrency` above your organisation maximum, or an invalid date change) still leaves the campaign **paused**. Check `campaign_status` after any failed update and resume if needed. Only `422` parameter-range errors (`max_retries`, `retry_delay_mins`, `concurrency`) are rejected before the pause.

***

## Path Parameters

**campaign\_id** `string` *required*

UUID of the campaign to update

***

## Request Parameters

All fields are optional. Only provide the fields you want to update.

**campaign\_name** `string`

Updated campaign name

**concurrency** `integer`

Updated concurrency (≥ 1 and ≤ org max)

**max\_retries** `integer`

Updated max retries (1-10)

**retry\_delay\_mins** `integer`

Updated retry delay (0-1440 minutes)

**start\_time** `string`

Updated start time - UTC HH:MM (e.g. `05:00`)

**end\_time** `string`

Updated end time - UTC HH:MM (e.g. `12:00`)

**days\_of\_week** `string`

Comma-separated weekdays

**from\_date** `string`

Updated from\_date YYYY-MM-DD

**to\_date** `string`

Updated to\_date YYYY-MM-DD

**notification\_emails** `string`

Comma-separated emails (max 5)

**campaign\_webhook\_url** `string`

Updated campaign webhook URL

**per\_call\_webhook\_url** `string`

Updated per-call webhook URL

***

## Example Request

```bash theme={null}
curl -X PUT "https://api.vaanivoice.ai/api/campaigns/abc-123-xyz" \
  -H "X-API-Key: vaani_abc123..." \
  -F "campaign_name=Updated Campaign" \
  -F "concurrency=10" \
  -F "start_time=05:00" \
  -F "end_time=12:00" \
  -F "days_of_week=monday,wednesday,friday"
```

***

## Response `200 OK`

```json theme={null}
{
  "id": "7817f2fd-3380-450e-80ac-8e5249633312",
  "client_id": "e3e5b338-937e-4672-a700-1a1f5817a385",
  "agent_id": "26356732-d0f3-449a-9fe7-6339ae157687",
  "campaign_name": "update name",
  "excel_blob_url": "https://vaani-uat-storage.s3.ap-south-1.amazonaws.com/campaigns/e3e5b338-937e-4672-a700-1a1f5817a385/36fb6df6-f08c-4899-9d7a-292334c5e84b_Untitled spreadsheet - Sheet1 (2) (1).csv",
  "results_excel_blob_url": null,
  "last_result_generated_at": null,
  "campaign_status": "paused",
  "contact_source_type": "csv",
  "gsheet_config": null,
  "days_of_week": "tuesday",
  "post_processing_status": "pending_excel",
  "time_range_from": "04:30:00Z",
  "time_range_to": "12:30:00Z",
  "max_retries": 3,
  "retry_after_mins": 30,
  "call_concurrency": 1,
  "start_date": "2026-08-25T04:30:00",
  "end_date": "2026-08-26T12:30:00",
  "created_at": "2026-08-25T10:40:26.128721",
  "updated_at": "2026-08-25T10:42:05.109356",
  "notification_emails": null,
  "webhook_url": "https://polite-dolphin-73.webhook.cool",
  "per_call_webhook_url": null,
  "webhook_id": null,
  "perform_dnd_check": false
}
```

***

## Important Notes

> [!WARNING]
>
> Campaign is automatically paused when edited. You must call `POST /api/campaigns/{id}/resume` to restart.

1. **Auto-Pause:** The campaign is paused first, then the update is validated. A rejected update does not undo the pause. Pausing also triggers a `campaign_paused` webhook and a notification email
2. **Partial Updates:** Only provided fields are updated
3. **Validation:** Same constraints as create endpoint apply (`max_retries` 1-10, `retry_delay_mins` 0-1440, `concurrency` ≥ 1 and ≤ your organisation maximum)
4. **Time Format:** UTC 24-hour HH:MM (02:30–14:29)

***

## Error Response

```json theme={null}
{
  "status_code": 400,
  "error": "Bad Request",
  "message": "No fields provided to update",
  "code": "NO_FIELDS_TO_UPDATE",
  "path": "/api/campaigns/abc-123-xyz",
  "timestamp": "2026-07-01T08:51:11.245139+00:00",
  "request_id": "6f1c1c0e-6a4e-4a43-9d51-0f1d0e2b9c11",
  "detail": "No fields provided to update"
}
```

The same `code` values as [Create Campaign](https://docs.vaanivoice.ai/api-reference/campaigns/create.md#common-validation-errors) apply here, plus `NO_FIELDS_TO_UPDATE`. Remember the campaign has already been paused when you receive this response.


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