> ## 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:** Campaign is automatically paused before any changes are applied.

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

***

## Path Parameters

<ParamField path="campaign_id" type="string" required>
  UUID of the campaign to update
</ParamField>

***

## Request Parameters

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

<ParamField body="campaign_name" type="string">
  Updated campaign name
</ParamField>

<ParamField body="concurrency" type="integer">
  Updated concurrency (≤ org max)
</ParamField>

<ParamField body="max_retries" type="integer">
  Updated max retries (1-10)
</ParamField>

<ParamField body="retry_delay_mins" type="integer">
  Updated retry delay (0-1440 minutes)
</ParamField>

<ParamField body="start_time" type="string">
  Updated start time — UTC HH:MM (e.g. `05:00`)
</ParamField>

<ParamField body="end_time" type="string">
  Updated end time — UTC HH:MM (e.g. `12:00`)
</ParamField>

<ParamField body="days_of_week" type="string">
  Comma-separated weekdays
</ParamField>

<ParamField body="from_date" type="string">
  Updated from\_date YYYY-MM-DD
</ParamField>

<ParamField body="to_date" type="string">
  Updated to\_date YYYY-MM-DD
</ParamField>

<ParamField body="notification_emails" type="string">
  Comma-separated emails (max 5)
</ParamField>

<ParamField body="campaign_webhook_url" type="string">
  Updated campaign webhook URL
</ParamField>

<ParamField body="per_call_webhook_url" type="string">
  Updated per-call webhook URL
</ParamField>

***

## Example Request

```bash theme={null}
curl -X PUT "https://api.vaani.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": "abc-123-xyz",
  "campaign_name": "Updated Campaign",
  "campaign_status": "paused",
  "call_concurrency": 10,
  "days_of_week": "monday,wednesday,friday",
  "time_range_from": "05:00:00Z",
  "time_range_to": "12:00:00Z",
  "updated_at": "2026-07-01T14:22:15Z"
}
```

***

## Important Notes

<Warning>
  Campaign is automatically paused when edited. You must call `POST /campaigns/{id}/resume` to restart.
</Warning>

1. **Auto-Pause:** Campaign is paused before any changes
2. **Partial Updates:** Only provided fields are updated
3. **Validation:** Same constraints as create endpoint apply
4. **Time Format:** UTC 24-hour HH:MM (02:30–14:29)

***

## Error Response

```json theme={null}
{
  "detail": {
    "code": "NO_FIELDS_TO_UPDATE",
    "message": "No fields provided to update"
  }
}
```
