# Create a campaign

`POST https://testing-backend.estactics.com/api/marketingCampaigns/create`

Adds a new campaign. A `campaignCode` is generated once the campaign is active.

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

## Body parameters

- `name` (string, required): 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, required): 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, required): 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
{
  "name": "Spring launch",
  "type": "SOCIAL_MEDIA",
  "platforms": [
    "FACEBOOK"
  ],
  "status": "ACTIVE",
  "brandId": 3,
  "defaultHierarchyAssigneeId": 7
}
```

## Example response

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