# Update Campaign

### Endpoint

**PUT** `https://app.marketingblocks.ai/api/v1/boost-campaigns/update-campaign/{campaign_id}`

### Permission

`boost-update-campaign`

### Request Body Parameters

All fields are optional, but only valid campaign fields should be sent.

| Parameter            | Type    | Description                          |
| -------------------- | ------- | ------------------------------------ |
| `boost_type`         | string  | Optional boost type.                 |
| `duration_type`      | string  | `daily_budget` or `lifetime_budget`. |
| `budget`             | number  | Updated budget.                      |
| `duration`           | integer | Updated duration in days.            |
| `countries`          | array   | Updated target countries.            |
| `interests`          | array   | Updated interests.                   |
| `campaign_objective` | string  | Updated objective.                   |
| `audience`           | array   | Updated audience.                    |

### Example Request

```bash
curl --location --request PUT 'https://app.marketingblocks.ai/api/v1/boost-campaigns/update-campaign/101' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "budget": 50,
    "duration": 10,
    "duration_type": "daily_budget",
    "countries": ["US", "CA"]
  }'
```

### Example Response

```json
{
  "campaigns": {
    "id": 101,
    "budget": 50,
    "duration": 10
  }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.marketingblocks.ai/agentic-ai-docs/api-reference/social-growth-engine/boost-campaign/update-campaign.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
