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

# Update Campaign

> Partially update campaign settings

## Endpoint

**PATCH** `https://api.graine.ai/api/v1/campaigns/{campaign_id}`

This is a partial update — only the fields you provide are changed. All Campaign fields are patchable.

## Path Parameters

| Parameter     | Type   | Required | Description        |
| ------------- | ------ | -------- | ------------------ |
| `campaign_id` | string | Yes      | Campaign to update |

## Headers

| Header          | Required | Description          |
| --------------- | -------- | -------------------- |
| `Authorization` | Yes      | `Bearer gat_<token>` |
| `Content-Type`  | Yes      | `application/json`   |

## Request Body

Send only the fields you want to change. Any subset of [Campaign fields](/api-reference/campaigns/create#request-body) is accepted.

### Common update patterns

**Rename a campaign**

```json theme={null}
{ "name": "Q2 Insurance Renewals (Updated)" }
```

**Tighten the retry policy**

```json theme={null}
{
  "retry_policy": {
    "max_retries": 5,
    "strategy": "fixed",
    "cooldown_minutes": 45
  }
}
```

**Switch phone number strategy**

```json theme={null}
{ "phone_number_strategy": "least_loaded" }
```

**Add a phone number**

```json theme={null}
{ "phone_numbers": ["+919876543210", "+919876543211", "+919876543212"] }
```

<Warning>
  Updating `working_hours` or `timezone` on a running campaign takes effect immediately — in-flight calls are not affected but newly dispatched contacts will use the new schedule.
</Warning>

## Example Request

```bash theme={null}
curl -X PATCH "https://api.graine.ai/api/v1/campaigns/cmp_abc123" \
  -H "Authorization: Bearer gat_your_token" \
  -H "Content-Type: application/json" \
  -d '{"name": "Q2 Insurance Renewals (Updated)", "retry_policy": {"max_retries": 5, "strategy": "fixed", "cooldown_minutes": 45}}'
```

## Response

### 200 OK

Returns the updated campaign object.

```json theme={null}
{
  "campaign_id": "cmp_abc123",
  "name": "Q2 Insurance Renewals (Updated)",
  "retry_policy": {
    "max_retries": 5,
    "strategy": "fixed",
    "cooldown_minutes": 45
  },
  "status": "active"
}
```

### 404 Not Found

```json theme={null}
{ "detail": "Campaign not found" }
```
