# Update a campaign

`POST https://backend.estactics.com/api/marketingCampaigns/update`

Changes a campaign. Always send `defaultHierarchyAssigneeId`, even when it does not change.

Authentication: `Authorization: Bearer YOUR_API_KEY`. Required permission: `marketingCampaigns.MANAGE`.

## Body parameters

- `id` (integer, required): ID of the campaign.
- `name` (string): Campaign name.
- `type` (SOCIAL_MEDIA | EMAIL | SMS | REFERRAL | SEO | SEM | DISPLAY | AFFILIATE | INFLUENCER | EVENT | OFFLINE | PUSH_NOTIFICATION | RETARGETING | PARTNERSHIP | PRODUCT_LAUNCH | BRAND_AWARENESS | COLD_OUTREACH | LEAD_MAGNET | ORGANIC | OTHER): Kind of campaign.
- `platforms` (array of string): Where the campaign runs. See List campaign platforms.
- `status` (DRAFT | ACTIVE | PAUSED | COMPLETED): Campaign status.
- `startedAt` (string): When the campaign started.
- `languageCode` (string): Language code of the campaign.
- `country` (string): Target country.
- `brandId` (integer): ID of the brand running the campaign.
- `defaultHierarchyAssigneeId` (integer, required): ID of the team that receives new clients from this campaign.
- `defaultUserAssigneeId` (integer): ID of the agent who receives new clients from this campaign.

## Example request body

```json
{
  "id": 45,
  "status": "PAUSED",
  "defaultHierarchyAssigneeId": 7
}
```

## Example response

```json
{
  "success": true,
  "data": {
    "id": 45,
    "campaignCode": "x7Kq2p",
    "status": "PAUSED"
  }
}
```
