# updateCampaign

Mutation

Change a campaign: rename it, move its end date, and add or remove creators on its roster.

Available to agents as MCP tool `updateCampaign` — see [Write tools](/api/v2/docs/mcp/write-tools#update-campaign).

## Arguments

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `input` | [`UpdateCampaignInput!`](/api/v2/docs/types/update-campaign-input) | Yes | — | Mutation input. |

## Returns

| Name | Type | Description |
| --- | --- | --- |
| `campaign` | [`Campaign`](/api/v2/docs/types/campaign) | The campaign after the call. Null only when the campaign-level change was refused. |
| `userErrors` | [`[UserError!]!`](/api/v2/docs/types/user-error) | List of user-facing validation errors; a refused roster or post entry is reported at its index path. Empty when everything applied. |

## Examples

### Update a campaign

Rename a campaign and update its end date without changing its roster or posts.

```graphql
mutation UpdateCampaignDefault($input: UpdateCampaignInput!) {
  updateCampaign(input: $input) {
    campaign {
      id
      name
      campaignType
      externalId
      dateStart
      dateEnd
      creatorsCount
    }
    userErrors {
      field
      message
    }
  }
}
```

Variables:

```json
{
  "input": {
    "id": "422fac58-557c-5cd4-8986-84ac3db4b133",
    "name": "Spring Launch 2025",
    "dateEnd": "2025-03-31T23:59:59Z"
  }
}
```

Response — HTTP 200:

```json
{
  "data": {
    "updateCampaign": {
      "campaign": {
        "id": "422fac58-557c-5cd4-8986-84ac3db4b133",
        "name": "Spring Launch 2025",
        "campaignType": "CONTENT_CAPTURE",
        "externalId": null,
        "dateStart": null,
        "dateEnd": "2025-03-31T23:59:59Z",
        "creatorsCount": 0
      },
      "userErrors": []
    }
  }
}
```
