# Update campaign settings

Source: https://docs.emelia.io/docs/campaigns/update-campaign-settings

Guide: [Campaigns](https://docs.emelia.io/docs/campaigns.md)

`PATCH https://api.emelia.io/advanced/campaigns/{campaignId}/settings`

Merges the given settings into the campaign schedule. Not allowed while RUNNING. Rules: `start` must be before `end`; `dailyEmailLimit` must be greater than or equal to `dailyEmailAdded`; `dailyLinkedinAdded` is capped at 40 when the sequence contains a CONNECTION step (80 otherwise). Returns the updated campaign.

## Authentication

Send your API key in the `Authorization` header: `Authorization: <your API key>`.

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `campaignId` | string | yes | Identifier of a multichannel campaign (24 hexadecimal characters), as returned by `POST /advanced/campaigns` or `GET /advanced/campaigns`. |

## Request body

Content type: `application/json`, required.

| Field | Type | Required | Description |
|---|---|---|---|
| `settings` | object | yes | Settings to merge into the campaign schedule. `trackLinks`, `trackOpens` and `blacklistUnsub` are required by validation; `start` and `end` are optional in the validator but the handler crashes without them, so always send them. Send the full object you read with `GET /advanced/campaigns/{campaignId}` (field `schedule`). |
| `settings.dailyEmailAdded` | integer | no | New contacts entering the email part of the sequence per day. Default: `35`. Range: 1 to 500. |
| `settings.dailyEmailLimit` | integer | no | Maximum emails sent per day. Must be greater than or equal to `dailyEmailAdded`. Default: `100`. Range: 1 to 500. |
| `settings.dailyLinkedinAdded` | integer | no | New contacts per day on LinkedIn. Real ceiling: 40 when the sequence contains a CONNECTION step, 80 otherwise. Default: `20`. Range: 1 to 80. |
| `settings.dailyWhatsappAdded` | integer | no | Default: `20`. Range: 1 to 30. |
| `settings.bcc` | string | no | Blind carbon copy address added to every email (empty string to disable). |
| `settings.trackLinks` | boolean | yes | Required for `CLICKED` conditions and click statistics. Default: `false`. |
| `settings.trackOpens` | boolean | yes | Required for `OPENED` conditions and open statistics. Default: `false`. |
| `settings.timeZone` | string | no | IANA time zone, for example `Europe/Paris`. Default: `"Europe/Brussels"`. |
| `settings.days` | array of integer | no | Sending days, 0 = Monday ... 6 = Sunday. Default: `[0,1,2,3,4]`. |
| `settings.start` | string | yes | Default: `"08:00"`. |
| `settings.end` | string | yes | Default: `"17:00"`. |
| `settings.blacklistUnsub` | boolean | yes | Adds contacts who unsubscribe to your blacklist. Default: `false`. |
| `settings.excludeAlreadyMessaged` | boolean | no |  |
| `settings.eventToStop` | array of enum: `VISITED`, `INVITED`, `ACCEPTED`, `MESSAGE_SENT`, `INMAIL_SENT`, `LINKEDIN_REPLIED`, `MAIL_REPLIED`, `RE_REPLY_EMAIL`, `RE_REPLY_LINKEDIN`, `FOLLOWED`, `LIKED`, `SENT`, `BOUNCED`, `RE_REPLY`, `OPENED`, `UNSUBSCRIBED`, `CLICKED`, `WHATSAPP_MESSAGE_SENT`, `WHATSAPP_REPLIED`, `TASK_COMPLETED`, `TASK_FAILED`, `FAILED_ACTION`, `EXCLUDED` | no | A contact leaves the sequence as soon as one of these events happens. New campaigns start with `["MAIL_REPLIED", "LINKEDIN_REPLIED", "WHATSAPP_REPLIED"]`. Bounced and unsubscribed contacts always stop. |
| `settings.alwaysOn` | boolean | no | Keeps the campaign running when all contacts are done, so that contacts added later are processed. Default: `false`. |
| `settings.ignoreAutoReplies` | boolean | no | Default: `false`. |
| `settings.name` | string | no | Optional new name. |

```json
{
  "settings": {
    "trackLinks": false,
    "trackOpens": false,
    "blacklistUnsub": true,
    "dailyEmailAdded": 30,
    "dailyEmailLimit": 100,
    "dailyLinkedinAdded": 20,
    "timeZone": "Europe/Paris",
    "days": [
      0,
      1,
      2,
      3,
      4
    ],
    "start": "08:30",
    "end": "18:00",
    "eventToStop": [
      "MAIL_REPLIED",
      "LINKEDIN_REPLIED"
    ]
  }
}
```

## Example request

**cURL**

```bash
curl -X PATCH "https://api.emelia.io/advanced/campaigns/6650f1a2b839d80011c5a0f1/settings" \
  -H "Authorization: $EMELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "settings": {
    "trackLinks": false,
    "trackOpens": false,
    "blacklistUnsub": true,
    "dailyEmailAdded": 30,
    "dailyEmailLimit": 100,
    "dailyLinkedinAdded": 20,
    "timeZone": "Europe/Paris",
    "days": [
      0,
      1,
      2,
      3,
      4
    ],
    "start": "08:30",
    "end": "18:00",
    "eventToStop": [
      "MAIL_REPLIED",
      "LINKEDIN_REPLIED"
    ]
  }
}'
```

**JavaScript**

```js
const response = await fetch('https://api.emelia.io/advanced/campaigns/6650f1a2b839d80011c5a0f1/settings', {
  method: 'PATCH',
  headers: { Authorization: process.env.EMELIA_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "settings": {
      "trackLinks": false,
      "trackOpens": false,
      "blacklistUnsub": true,
      "dailyEmailAdded": 30,
      "dailyEmailLimit": 100,
      "dailyLinkedinAdded": 20,
      "timeZone": "Europe/Paris",
      "days": [
        0,
        1,
        2,
        3,
        4
      ],
      "start": "08:30",
      "end": "18:00",
      "eventToStop": [
        "MAIL_REPLIED",
        "LINKEDIN_REPLIED"
      ]
    }
  }),
});
console.log(await response.json());
```

**Python**

```python
import os
import requests

response = requests.patch(
    "https://api.emelia.io/advanced/campaigns/6650f1a2b839d80011c5a0f1/settings",
    headers={"Authorization": os.environ["EMELIA_API_KEY"]},
    json={
        "settings": {
            "trackLinks": False,
            "trackOpens": False,
            "blacklistUnsub": True,
            "dailyEmailAdded": 30,
            "dailyEmailLimit": 100,
            "dailyLinkedinAdded": 20,
            "timeZone": "Europe/Paris",
            "days": [
                0,
                1,
                2,
                3,
                4
            ],
            "start": "08:30",
            "end": "18:00",
            "eventToStop": [
                "MAIL_REPLIED",
                "LINKEDIN_REPLIED"
            ]
        }
    },
)
print(response.json())
```

## Responses

### 200: Success.

| Field | Type | Required | Description |
|---|---|---|---|
| `success` | any | no |  |
| `campaign` | object | no | Full multichannel campaign as stored (internal fields such as `__v`, `hubspotIntegration`, `pipedriveIntegration` and `zapierData` are returned too). |
| `campaign._id` | string | no | MongoDB ObjectId: 24 hexadecimal characters. |
| `campaign.name` | string | no |  |
| `campaign.status` | enum: `DRAFT`, `RUNNING`, `PAUSED`, `FINISHED`, `ARCHIVED` | no |  |
| `campaign.tagIds` | array of string | no |  |
| `campaign.identities` | array of object | no |  |
| `campaign.schedule` | object | no | Sending settings of a multichannel campaign. Defaults of a new campaign are shown. |
| `campaign.steps` | object | no | One node of the sequence tree. The root is always a `START` step. Each node points to the next one with `next`; a `CONDITION` node branches with `yes` and `no` (a missing branch ends the sequence for the contacts that fall into it). `END_OF_CAMPAIGN` stops the sequence. EMAIL versions are A/B variants (one version per contact); MESSAGE and WHATSAPP versions are successive messages sent in order. A MESSAGE step placed after a CONNECTION step waits for the invitation to be accepted. |
| `campaign.recipients` | object | no |  |
| `campaign.zapierData` | array of object | no | Webhooks registered on this campaign. |
| `campaign.hubspotIntegration` | object | no |  |
| `campaign.pipedriveIntegration` | object | no |  |
| `campaign.createdAt` | string (date-time) | no |  |
| `campaign.startAt` | string (date-time) | no |  |
| `campaign.estimatedEnd` | string (date-time) | no |  |
| `campaign.plannedStart` | string (date-time) | no |  |
| `campaign.__v` | integer | no |  |

```json
{
  "success": true,
  "campaign": {
    "_id": "6650f1a2b839d80011c5a0f1",
    "name": "Q4 outreach: SaaS founders",
    "status": "DRAFT",
    "tagIds": [
      "6650f1a2b839d80011c5a0f1"
    ],
    "identities": [
      {
        "_id": "6650f1a2b839d80011c5a0f1",
        "userId": "6650f1a2b839d80011c5a0f1",
        "name": "Marie Martin",
        "email": "6650f1a2b839d80011c5a0f1",
        "linkedin": "6650f1a2b839d80011c5a0f1",
        "whatsapp": "6650f1a2b839d80011c5a0f1"
      }
    ],
    "schedule": {
      "dailyEmailAdded": 35,
      "dailyEmailLimit": 100,
      "dailyLinkedinAdded": 20,
      "dailyWhatsappAdded": 20,
      "bcc": "",
      "trackLinks": false,
      "trackOpens": false,
      "timeZone": "Europe/Brussels",
      "days": [
        0,
        1,
        2,
        3,
        4
      ],
      "start": "08:00",
      "end": "17:00",
      "blacklistUnsub": false,
      "excludeAlreadyMessaged": true,
      "eventToStop": [
        "VISITED"
      ],
      "alwaysOn": false,
      "ignoreAutoReplies": false
    },
    "steps": {
      "_id": "6650f1a2b839d800738c8e79",
      "stepType": "START",
      "delay": {
        "amount": 1,
        "unit": "MINUTES"
      },
      "identities": [
        "6650f1a2b839d800c4ad78e1"
      ],
      "versions": [
        {
          "_id": "6650f1a2b839d80061ffa284",
          "subject": "Quick question about Nexora",
          "message": "Hi Claire, thanks for your reply. Are you free for a call on Thursday?",
          "disabled": false,
          "rawHtml": true,
          "attachments": [
            {
              "mediaType": "MEDIA"
            }
          ]
        }
      ],
      "cc": "",
      "conditions": {
        "field": "MAIL_REPLIED",
        "operator": "EQUAL"
      },
      "next": {
        "_id": "6650f1a2b839d800db5ebfa8",
        "stepType": "START",
        "delay": {
          "amount": 1,
          "unit": "MINUTES"
        },
        "identities": [
          "6650f1a2b839d800e60a709c"
        ],
        "versions": [
          {
            "_id": "6650f1a2b839d80069bcea47",
            "subject": "Quick question about Nexora",
            "message": "Hi Claire, thanks for your reply. Are you free for a call on Thursday?",
            "disabled": false,
            "rawHtml": true,
            "attachments": []
          }
        ],
        "cc": "",
        "conditions": {
          "field": "MAIL_REPLIED",
          "operator": "EQUAL"
        },
        "next": {
          "_id": "6650f1a2b839d8006f3f4cf7",
          "stepType": "START",
          "delay": {
            "amount": 1,
            "unit": "MINUTES"
          },
          "identities": [
            "6650f1a2b839d8002afcd407"
          ],
          "versions": [
            {}
          ],
          "cc": "",
          "conditions": {
            "field": "MAIL_REPLIED",
            "operator": "EQUAL"
          },
          "next": {
            "_id": "6650f1a2b839d800be025a62",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "yes": {
            "_id": "6650f1a2b839d800d66b0e86",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "no": {
            "_id": "6650f1a2b839d8007d4f87d0",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          }
        },
        "yes": {
          "_id": "6650f1a2b839d800ac9b82b5",
          "stepType": "START",
          "delay": {
            "amount": 1,
            "unit": "MINUTES"
          },
          "identities": [
            "6650f1a2b839d8001b26d55d"
          ],
          "versions": [
            {}
          ],
          "cc": "",
          "conditions": {
            "field": "MAIL_REPLIED",
            "operator": "EQUAL"
          },
          "next": {
            "_id": "6650f1a2b839d80044576ddc",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "yes": {
            "_id": "6650f1a2b839d8001d721aa4",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "no": {
            "_id": "6650f1a2b839d800de92ba26",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          }
        },
        "no": {
          "_id": "6650f1a2b839d80025f91939",
          "stepType": "START",
          "delay": {
            "amount": 1,
            "unit": "MINUTES"
          },
          "identities": [
            "6650f1a2b839d800a41d81a1"
          ],
          "versions": [
            {}
          ],
          "cc": "",
          "conditions": {
            "field": "MAIL_REPLIED",
            "operator": "EQUAL"
          },
          "next": {
            "_id": "6650f1a2b839d8003de932e8",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "yes": {
            "_id": "6650f1a2b839d800ff6e8d48",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "no": {
            "_id": "6650f1a2b839d8005553616a",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          }
        }
      },
      "yes": {
        "_id": "6650f1a2b839d8006c228008",
        "stepType": "START",
        "delay": {
          "amount": 1,
          "unit": "MINUTES"
        },
        "identities": [
          "6650f1a2b839d800c32d0efc"
        ],
        "versions": [
          {
            "_id": "6650f1a2b839d8006e1fe027",
            "subject": "Quick question about Nexora",
            "message": "Hi Claire, thanks for your reply. Are you free for a call on Thursday?",
            "disabled": false,
            "rawHtml": true,
            "attachments": []
          }
        ],
        "cc": "",
        "conditions": {
          "field": "MAIL_REPLIED",
          "operator": "EQUAL"
        },
        "next": {
          "_id": "6650f1a2b839d800761a0cd7",
          "stepType": "START",
          "delay": {
            "amount": 1,
            "unit": "MINUTES"
          },
          "identities": [
            "6650f1a2b839d8000aec6567"
          ],
          "versions": [
            {}
          ],
          "cc": "",
          "conditions": {
            "field": "MAIL_REPLIED",
            "operator": "EQUAL"
          },
          "next": {
            "_id": "6650f1a2b839d800447d29c2",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "yes": {
            "_id": "6650f1a2b839d8002dfc5ce6",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "no": {
            "_id": "6650f1a2b839d800e1f3ffb0",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          }
        },
        "yes": {
          "_id": "6650f1a2b839d800f9659915",
          "stepType": "START",
          "delay": {
            "amount": 1,
            "unit": "MINUTES"
          },
          "identities": [
            "6650f1a2b839d80084b3603d"
          ],
          "versions": [
            {}
          ],
          "cc": "",
          "conditions": {
            "field": "MAIL_REPLIED",
            "operator": "EQUAL"
          },
          "next": {
            "_id": "6650f1a2b839d80008e9d5bc",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "yes": {
            "_id": "6650f1a2b839d80004619884",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "no": {
            "_id": "6650f1a2b839d8001b596a86",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          }
        },
        "no": {
          "_id": "6650f1a2b839d8009b912d19",
          "stepType": "START",
          "delay": {
            "amount": 1,
            "unit": "MINUTES"
          },
          "identities": [
            "6650f1a2b839d800c3847301"
          ],
          "versions": [
            {}
          ],
          "cc": "",
          "conditions": {
            "field": "MAIL_REPLIED",
            "operator": "EQUAL"
          },
          "next": {
            "_id": "6650f1a2b839d800a52c6ec8",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "yes": {
            "_id": "6650f1a2b839d800d62ec0a8",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "no": {
            "_id": "6650f1a2b839d8005d65cfca",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          }
        }
      },
      "no": {
        "_id": "6650f1a2b839d8005817272a",
        "stepType": "START",
        "delay": {
          "amount": 1,
          "unit": "MINUTES"
        },
        "identities": [
          "6650f1a2b839d800a8ab4b96"
        ],
        "versions": [
          {
            "_id": "6650f1a2b839d80013f3f339",
            "subject": "Quick question about Nexora",
            "message": "Hi Claire, thanks for your reply. Are you free for a call on Thursday?",
            "disabled": false,
            "rawHtml": true,
            "attachments": []
          }
        ],
        "cc": "",
        "conditions": {
          "field": "MAIL_REPLIED",
          "operator": "EQUAL"
        },
        "next": {
          "_id": "6650f1a2b839d8005fa8071d",
          "stepType": "START",
          "delay": {
            "amount": 1,
            "unit": "MINUTES"
          },
          "identities": [
            "6650f1a2b839d800d7d67e45"
          ],
          "versions": [
            {}
          ],
          "cc": "",
          "conditions": {
            "field": "MAIL_REPLIED",
            "operator": "EQUAL"
          },
          "next": {
            "_id": "6650f1a2b839d80095424704",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "yes": {
            "_id": "6650f1a2b839d8005274960c",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "no": {
            "_id": "6650f1a2b839d800a24d236e",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          }
        },
        "yes": {
          "_id": "6650f1a2b839d8007a5b5c0f",
          "stepType": "START",
          "delay": {
            "amount": 1,
            "unit": "MINUTES"
          },
          "identities": [
            "6650f1a2b839d800275b907f"
          ],
          "versions": [
            {}
          ],
          "cc": "",
          "conditions": {
            "field": "MAIL_REPLIED",
            "operator": "EQUAL"
          },
          "next": {
            "_id": "6650f1a2b839d8008fd0d3ba",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "yes": {
            "_id": "6650f1a2b839d8009543f45e",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "no": {
            "_id": "6650f1a2b839d800aeb4b288",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          }
        },
        "no": {
          "_id": "6650f1a2b839d800269b91e3",
          "stepType": "START",
          "delay": {
            "amount": 1,
            "unit": "MINUTES"
          },
          "identities": [
            "6650f1a2b839d800341e3fb3"
          ],
          "versions": [
            {}
          ],
          "cc": "",
          "conditions": {
            "field": "MAIL_REPLIED",
            "operator": "EQUAL"
          },
          "next": {
            "_id": "6650f1a2b839d8007b27d3c6",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "yes": {
            "_id": "6650f1a2b839d800cad2b9e2",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "no": {
            "_id": "6650f1a2b839d80002b6d29c",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          }
        }
      }
    },
    "recipients": {
      "lists": [
        {
          "_id": "6650f1a2b839d80011c5a0f1",
          "name": "Q4 outreach: SaaS founders",
          "contactCount": 1
        }
      ],
      "excludedLists": [
        {
          "_id": "6650f1a2b839d80011c5a0f1",
          "name": "Q4 outreach: SaaS founders",
          "contactCount": 1
        }
      ],
      "processing": true
    },
    "zapierData": [
      {
        "_id": "6650f1a2b839d80011c5a0f1",
        "webhookUrl": "https://hooks.yourcompany.com/emelia",
        "events": []
      }
    ],
    "hubspotIntegration": {},
    "pipedriveIntegration": {},
    "createdAt": "2026-10-06T09:30:00.000Z",
    "startAt": "2026-10-06T09:30:00.000Z",
    "estimatedEnd": "2026-10-06T09:30:00.000Z",
    "plannedStart": "2026-10-06T09:30:00.000Z"
  }
}
```

### 400: Invalid request.

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | string or object | yes | Human readable message. A few legacy routes return an empty object `{}` here instead of a string. |
| `code` | enum: `INVALID_REQUEST`, `INVALID_PARAMETERS`, `SUBSCRIPTION_REQUIRED`, `CAMPAIGN_NOT_FOUND`, `CAMPAIGN_ALREADY_RUNNING`, `SCHEDULE_MISSING`, `STEPS_MISSING`, `NO_RECIPIENTS`, `TOO_MANY_RECIPIENTS`, `PLANNED_START_INVALID`, `PLANNED_START_IN_PAST`, `EMAIL_PROVIDER_MISSING`, `EMAIL_PROVIDER_DISCONNECTED`, `EMAIL_PROVIDER_EXPIRED`, `ONE_EMAIL_PROVIDER_EXPIRED`, `EMAIL_ADDRESS_DISCONNECTED`, `TRACKING_DOMAINS_REQUIRED`, `LINKEDIN_ACCOUNT_MISSING`, `LINKEDIN_COOKIE_EXPIRED`, `LINKEDIN_SLOT_EXPIRED`, `WHATSAPP_ACCOUNT_EXPIRED`, `WHATSAPP_SLOT_EXPIRED`, `NO_IDENTITY_SET`, `IDENTITY_FOREIGN_ACCOUNT`, `IDENTITY_EMAIL_PROVIDER_MISSING`, `LINKEDIN_ACCOUNT_AMBIGUOUS`, `WHATSAPP_ACCOUNT_AMBIGUOUS`, `LINKEDIN_AUDIO_MISSING`, `EMAIL_STEP_NO_ACTIVE_VERSION`, `EMAIL_VERSION_NO_CONTENT`, `EMAIL_VERSION_NO_SUBJECT`, `RECIPIENTS_NO_EMAIL`, `RECIPIENTS_NO_LINKEDIN`, `MC_LINKEDIN_DAILY_LIMIT_CONNECTION`, `MC_LINKEDIN_DAILY_LIMIT`, `DAILY_CONTACT_TOO_LOW`, `LINKEDIN_DAILY_CONTACT_LIMIT`, `VERIFY_EMAIL_TOKEN_INVALID`, `VERIFY_EMAIL_TOKEN_EXPIRED`, `FREE_CREDITS_DOMAIN_ALREADY_CLAIMED`, `FREE_CREDITS_ALREADY_GRANTED`, `FREE_CREDITS_NOT_ELIGIBLE`, `RATE_LIMITED`, `STATS_COMPUTING`, `WARMUP_PROVIDER_UNSUPPORTED`, `ACCOUNT_DISCONNECTED` | no | Stable machine readable error code. Present only on catalogued errors (mainly the campaign start checks), on validation errors (`INVALID_REQUEST`) and on some LinkedIn provider errors (`ACCOUNT_DISCONNECTED`, `RATE_LIMITED`). Most other errors have no code: rely on the HTTP status and on `error`. Codes are never renamed once deployed. |
| `params` | object | no | Values interpolated in the message, for example `{"max": 30000}`. |

```json
{
  "error": "string",
  "code": "INVALID_REQUEST",
  "params": {}
}
```

### 401: Missing, malformed, unknown or disabled API key. The key must be exactly 48 characters, otherwise it is treated as a session token and rejected the same way.

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | string or object | yes | Human readable message. A few legacy routes return an empty object `{}` here instead of a string. |
| `code` | enum: `INVALID_REQUEST`, `INVALID_PARAMETERS`, `SUBSCRIPTION_REQUIRED`, `CAMPAIGN_NOT_FOUND`, `CAMPAIGN_ALREADY_RUNNING`, `SCHEDULE_MISSING`, `STEPS_MISSING`, `NO_RECIPIENTS`, `TOO_MANY_RECIPIENTS`, `PLANNED_START_INVALID`, `PLANNED_START_IN_PAST`, `EMAIL_PROVIDER_MISSING`, `EMAIL_PROVIDER_DISCONNECTED`, `EMAIL_PROVIDER_EXPIRED`, `ONE_EMAIL_PROVIDER_EXPIRED`, `EMAIL_ADDRESS_DISCONNECTED`, `TRACKING_DOMAINS_REQUIRED`, `LINKEDIN_ACCOUNT_MISSING`, `LINKEDIN_COOKIE_EXPIRED`, `LINKEDIN_SLOT_EXPIRED`, `WHATSAPP_ACCOUNT_EXPIRED`, `WHATSAPP_SLOT_EXPIRED`, `NO_IDENTITY_SET`, `IDENTITY_FOREIGN_ACCOUNT`, `IDENTITY_EMAIL_PROVIDER_MISSING`, `LINKEDIN_ACCOUNT_AMBIGUOUS`, `WHATSAPP_ACCOUNT_AMBIGUOUS`, `LINKEDIN_AUDIO_MISSING`, `EMAIL_STEP_NO_ACTIVE_VERSION`, `EMAIL_VERSION_NO_CONTENT`, `EMAIL_VERSION_NO_SUBJECT`, `RECIPIENTS_NO_EMAIL`, `RECIPIENTS_NO_LINKEDIN`, `MC_LINKEDIN_DAILY_LIMIT_CONNECTION`, `MC_LINKEDIN_DAILY_LIMIT`, `DAILY_CONTACT_TOO_LOW`, `LINKEDIN_DAILY_CONTACT_LIMIT`, `VERIFY_EMAIL_TOKEN_INVALID`, `VERIFY_EMAIL_TOKEN_EXPIRED`, `FREE_CREDITS_DOMAIN_ALREADY_CLAIMED`, `FREE_CREDITS_ALREADY_GRANTED`, `FREE_CREDITS_NOT_ELIGIBLE`, `RATE_LIMITED`, `STATS_COMPUTING`, `WARMUP_PROVIDER_UNSUPPORTED`, `ACCOUNT_DISCONNECTED` | no | Stable machine readable error code. Present only on catalogued errors (mainly the campaign start checks), on validation errors (`INVALID_REQUEST`) and on some LinkedIn provider errors (`ACCOUNT_DISCONNECTED`, `RATE_LIMITED`). Most other errors have no code: rely on the HTTP status and on `error`. Codes are never renamed once deployed. |
| `params` | object | no | Values interpolated in the message, for example `{"max": 30000}`. |

```json
{
  "error": "Authentication required"
}
```

### 500: Unexpected error. IMPORTANT: this is also what you receive today when the per minute quota of your account is exceeded (the quota error is not mapped to 429 for API keys). No `Retry-After` header is sent. Wait until the next minute window before retrying.

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | string or object | yes | Human readable message. A few legacy routes return an empty object `{}` here instead of a string. |
| `code` | enum: `INVALID_REQUEST`, `INVALID_PARAMETERS`, `SUBSCRIPTION_REQUIRED`, `CAMPAIGN_NOT_FOUND`, `CAMPAIGN_ALREADY_RUNNING`, `SCHEDULE_MISSING`, `STEPS_MISSING`, `NO_RECIPIENTS`, `TOO_MANY_RECIPIENTS`, `PLANNED_START_INVALID`, `PLANNED_START_IN_PAST`, `EMAIL_PROVIDER_MISSING`, `EMAIL_PROVIDER_DISCONNECTED`, `EMAIL_PROVIDER_EXPIRED`, `ONE_EMAIL_PROVIDER_EXPIRED`, `EMAIL_ADDRESS_DISCONNECTED`, `TRACKING_DOMAINS_REQUIRED`, `LINKEDIN_ACCOUNT_MISSING`, `LINKEDIN_COOKIE_EXPIRED`, `LINKEDIN_SLOT_EXPIRED`, `WHATSAPP_ACCOUNT_EXPIRED`, `WHATSAPP_SLOT_EXPIRED`, `NO_IDENTITY_SET`, `IDENTITY_FOREIGN_ACCOUNT`, `IDENTITY_EMAIL_PROVIDER_MISSING`, `LINKEDIN_ACCOUNT_AMBIGUOUS`, `WHATSAPP_ACCOUNT_AMBIGUOUS`, `LINKEDIN_AUDIO_MISSING`, `EMAIL_STEP_NO_ACTIVE_VERSION`, `EMAIL_VERSION_NO_CONTENT`, `EMAIL_VERSION_NO_SUBJECT`, `RECIPIENTS_NO_EMAIL`, `RECIPIENTS_NO_LINKEDIN`, `MC_LINKEDIN_DAILY_LIMIT_CONNECTION`, `MC_LINKEDIN_DAILY_LIMIT`, `DAILY_CONTACT_TOO_LOW`, `LINKEDIN_DAILY_CONTACT_LIMIT`, `VERIFY_EMAIL_TOKEN_INVALID`, `VERIFY_EMAIL_TOKEN_EXPIRED`, `FREE_CREDITS_DOMAIN_ALREADY_CLAIMED`, `FREE_CREDITS_ALREADY_GRANTED`, `FREE_CREDITS_NOT_ELIGIBLE`, `RATE_LIMITED`, `STATS_COMPUTING`, `WARMUP_PROVIDER_UNSUPPORTED`, `ACCOUNT_DISCONNECTED` | no | Stable machine readable error code. Present only on catalogued errors (mainly the campaign start checks), on validation errors (`INVALID_REQUEST`) and on some LinkedIn provider errors (`ACCOUNT_DISCONNECTED`, `RATE_LIMITED`). Most other errors have no code: rely on the HTTP status and on `error`. Codes are never renamed once deployed. |
| `params` | object | no | Values interpolated in the message, for example `{"max": 30000}`. |

```json
{
  "error": "Internal server error"
}
```
