> For the complete documentation index, see [llms.txt](https://developers.rewardful.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.rewardful.com/rest-api/campaigns/update-campaign.md).

# Update campaign

Updates the specified campaign by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

## Request

| Method | URL                                             |
| ------ | ----------------------------------------------- |
| `PUT`  | `https://api.getrewardful.com/v1/campaigns/:id` |

### Parameters

| Parameter                    | Required? | Description                                                                                                                                                                                                                                                                                                                                                     |
| ---------------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`                       | No        | The campaign's name                                                                                                                                                                                                                                                                                                                                             |
| `url`                        | No        | The base URL that will be used to generate affiliate links for the campaign                                                                                                                                                                                                                                                                                     |
| `private`                    | No        | `true` if the campaign should be invite-only, `false` if it should be open to the public.  (Default: `false`)                                                                                                                                                                                                                                                   |
| `reward_type`                | No        | The type of reward associated with this campaign - `percent` or `amount`                                                                                                                                                                                                                                                                                        |
| `commission_percent`         | No        | The commission percentage for this campaign                                                                                                                                                                                                                                                                                                                     |
| `commission_amount_cents`    | No        | The amount of the fixed commission for this campaign in cents                                                                                                                                                                                                                                                                                                   |
| `commission_amount_currency` | No        | <p>ISO currency code in which the fixed commission for this campaign is denominated.<br>Fixed commissions can be defined in any currency, but they will be converted to and displayed in your company's display currency when awarded.</p>                                                                                                                      |
| `minimum_payout_cents`       | No        | The minimum amount of cumulative commissions required for an affiliate to receive a payout in cents denominated in your company's display currency. (Default: `0`)                                                                                                                                                                                              |
| `stripe_coupon_id`           | No        | <p>The ID of the Stripe coupon associated with this campaign, used for <a href="https://help.rewardful.com/en/articles/3024552-double-sided-incentives">double-sided incentives</a>.<br>Since this feature is only enabled for customers on our Growth and Enterprise plans, attempts by other subscribers to set a value for this with result in an error.</p> |

### Example

```
curl --request PUT \
  --url https://api.getrewardful.com/v1/campaigns/ceaef6d9-767e-49aa-a6ab-46c02aa79604 \
  -u YOUR_API_SECRET: \
  -d "name=Best All Time Friends of Rewardful" \
  -d minimum_payout_cents=1000
```

## Response

{% tabs %}
{% tab title="Success" %}

| Response code | Body                                                                   |
| ------------- | ---------------------------------------------------------------------- |
| `200`         | A [campaign object](/rest-api/campaigns/the-campaign-object.md) (JSON) |
| {% endtab %}  |                                                                        |

{% tab title="Failures" %}

### Not found

| Response code | Body                              |
| ------------- | --------------------------------- |
| `404`         | JSON object describing the error. |

```
{  "error": "Campaign not found: " }
```

### Authentication failure

| Response code | Body                                       |
| ------------- | ------------------------------------------ |
| `401`         | Description of the authentication failure. |

```
{  "error": "Invalid API Secret." }
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developers.rewardful.com/rest-api/campaigns/update-campaign.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
