# Set the sender identities

Source: https://docs.emelia.io/docs/campaigns/set-sender-identities

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

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

Replaces the identities (sending accounts) of the campaign. Not allowed while RUNNING. For each step Emelia picks automatically, among these identities, the least used one that has an account on the channel. Rules checked at start: every identity needs an email provider if the sequence has an email step; with a LinkedIn step either use a single LinkedIn account or attach one to every identity.

## 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 |
|---|---|---|---|
| `identities` | array of any | yes |  |
| `identities[].name` | string | yes |  |
| `identities[].email` | string | no | Email provider id (`_id` from `GET /email-providers`). |
| `identities[].linkedin` | string | no | LinkedIn account id. |
| `identities[].whatsapp` | string | no | WhatsApp account id. |

```json
{
  "identities": [
    {
      "name": "Marie Martin",
      "email": "6650f1a2b839d80011c5a0aa",
      "linkedin": "6650f1a2b839d80011c5a0bb"
    }
  ]
}
```

## Example request

**cURL**

```bash
curl -X PATCH "https://api.emelia.io/advanced/campaigns/6650f1a2b839d80011c5a0f1/identities" \
  -H "Authorization: $EMELIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "identities": [
    {
      "name": "Marie Martin",
      "email": "6650f1a2b839d80011c5a0aa",
      "linkedin": "6650f1a2b839d80011c5a0bb"
    }
  ]
}'
```

**JavaScript**

```js
const response = await fetch('https://api.emelia.io/advanced/campaigns/6650f1a2b839d80011c5a0f1/identities', {
  method: 'PATCH',
  headers: { Authorization: process.env.EMELIA_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "identities": [
      {
        "name": "Marie Martin",
        "email": "6650f1a2b839d80011c5a0aa",
        "linkedin": "6650f1a2b839d80011c5a0bb"
      }
    ]
  }),
});
console.log(await response.json());
```

**Python**

```python
import os
import requests

response = requests.patch(
    "https://api.emelia.io/advanced/campaigns/6650f1a2b839d80011c5a0f1/identities",
    headers={"Authorization": os.environ["EMELIA_API_KEY"]},
    json={
        "identities": [
            {
                "name": "Marie Martin",
                "email": "6650f1a2b839d80011c5a0aa",
                "linkedin": "6650f1a2b839d80011c5a0bb"
            }
        ]
    },
)
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": "6650f1a2b839d800a4e02834",
      "stepType": "START",
      "delay": {
        "amount": 1,
        "unit": "MINUTES"
      },
      "identities": [
        "6650f1a2b839d80044baeb18"
      ],
      "versions": [
        {
          "_id": "6650f1a2b839d80013570f83",
          "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": "6650f1a2b839d800a25c662b",
        "stepType": "START",
        "delay": {
          "amount": 1,
          "unit": "MINUTES"
        },
        "identities": [
          "6650f1a2b839d8007164273b"
        ],
        "versions": [
          {
            "_id": "6650f1a2b839d800e3cff90e",
            "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": "6650f1a2b839d8000c8b40ee",
          "stepType": "START",
          "delay": {
            "amount": 1,
            "unit": "MINUTES"
          },
          "identities": [
            "6650f1a2b839d800c97cfdea"
          ],
          "versions": [
            {}
          ],
          "cc": "",
          "conditions": {
            "field": "MAIL_REPLIED",
            "operator": "EQUAL"
          },
          "next": {
            "_id": "6650f1a2b839d8000e5ac9e9",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "yes": {
            "_id": "6650f1a2b839d8005883bad3",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "no": {
            "_id": "6650f1a2b839d80061d63f27",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          }
        },
        "yes": {
          "_id": "6650f1a2b839d800e67c4eaa",
          "stepType": "START",
          "delay": {
            "amount": 1,
            "unit": "MINUTES"
          },
          "identities": [
            "6650f1a2b839d800738d2716"
          ],
          "versions": [
            {}
          ],
          "cc": "",
          "conditions": {
            "field": "MAIL_REPLIED",
            "operator": "EQUAL"
          },
          "next": {
            "_id": "6650f1a2b839d800a9299d9d",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "yes": {
            "_id": "6650f1a2b839d8009dcb7b8f",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "no": {
            "_id": "6650f1a2b839d80015dca463",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          }
        },
        "no": {
          "_id": "6650f1a2b839d8003f5b7624",
          "stepType": "START",
          "delay": {
            "amount": 1,
            "unit": "MINUTES"
          },
          "identities": [
            "6650f1a2b839d80031d36b08"
          ],
          "versions": [
            {}
          ],
          "cc": "",
          "conditions": {
            "field": "MAIL_REPLIED",
            "operator": "EQUAL"
          },
          "next": {
            "_id": "6650f1a2b839d8004f4341bb",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "yes": {
            "_id": "6650f1a2b839d800e426b271",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "no": {
            "_id": "6650f1a2b839d80045c41fd5",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          }
        }
      },
      "yes": {
        "_id": "6650f1a2b839d8006176ac81",
        "stepType": "START",
        "delay": {
          "amount": 1,
          "unit": "MINUTES"
        },
        "identities": [
          "6650f1a2b839d800688e2e89"
        ],
        "versions": [
          {
            "_id": "6650f1a2b839d8003873fb5c",
            "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": "6650f1a2b839d800f6c87010",
          "stepType": "START",
          "delay": {
            "amount": 1,
            "unit": "MINUTES"
          },
          "identities": [
            "6650f1a2b839d800fa504e04"
          ],
          "versions": [
            {}
          ],
          "cc": "",
          "conditions": {
            "field": "MAIL_REPLIED",
            "operator": "EQUAL"
          },
          "next": {
            "_id": "6650f1a2b839d8001e6fbabf",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "yes": {
            "_id": "6650f1a2b839d8001acbc61d",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "no": {
            "_id": "6650f1a2b839d800d0a9c1e1",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          }
        },
        "yes": {
          "_id": "6650f1a2b839d800c23685b0",
          "stepType": "START",
          "delay": {
            "amount": 1,
            "unit": "MINUTES"
          },
          "identities": [
            "6650f1a2b839d800606da324"
          ],
          "versions": [
            {}
          ],
          "cc": "",
          "conditions": {
            "field": "MAIL_REPLIED",
            "operator": "EQUAL"
          },
          "next": {
            "_id": "6650f1a2b839d800d934ec5f",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "yes": {
            "_id": "6650f1a2b839d800dcd064bd",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "no": {
            "_id": "6650f1a2b839d800f5c16001",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          }
        },
        "no": {
          "_id": "6650f1a2b839d800950dae32",
          "stepType": "START",
          "delay": {
            "amount": 1,
            "unit": "MINUTES"
          },
          "identities": [
            "6650f1a2b839d800711678de"
          ],
          "versions": [
            {}
          ],
          "cc": "",
          "conditions": {
            "field": "MAIL_REPLIED",
            "operator": "EQUAL"
          },
          "next": {
            "_id": "6650f1a2b839d800d24726a5",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "yes": {
            "_id": "6650f1a2b839d800895e1257",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "no": {
            "_id": "6650f1a2b839d800590ca2cb",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          }
        }
      },
      "no": {
        "_id": "6650f1a2b839d8006b649885",
        "stepType": "START",
        "delay": {
          "amount": 1,
          "unit": "MINUTES"
        },
        "identities": [
          "6650f1a2b839d800d2be6fad"
        ],
        "versions": [
          {
            "_id": "6650f1a2b839d800c7040c20",
            "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": "6650f1a2b839d8003c66838c",
          "stepType": "START",
          "delay": {
            "amount": 1,
            "unit": "MINUTES"
          },
          "identities": [
            "6650f1a2b839d800223b38d0"
          ],
          "versions": [
            {}
          ],
          "cc": "",
          "conditions": {
            "field": "MAIL_REPLIED",
            "operator": "EQUAL"
          },
          "next": {
            "_id": "6650f1a2b839d80041903763",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "yes": {
            "_id": "6650f1a2b839d800d9b8ce99",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "no": {
            "_id": "6650f1a2b839d800fdcd421d",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          }
        },
        "yes": {
          "_id": "6650f1a2b839d8008390e2f4",
          "stepType": "START",
          "delay": {
            "amount": 1,
            "unit": "MINUTES"
          },
          "identities": [
            "6650f1a2b839d8007f9038d8"
          ],
          "versions": [
            {}
          ],
          "cc": "",
          "conditions": {
            "field": "MAIL_REPLIED",
            "operator": "EQUAL"
          },
          "next": {
            "_id": "6650f1a2b839d800caf55a6b",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "yes": {
            "_id": "6650f1a2b839d8001f7d0ac1",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "no": {
            "_id": "6650f1a2b839d80009d680c5",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          }
        },
        "no": {
          "_id": "6650f1a2b839d8006e1f3416",
          "stepType": "START",
          "delay": {
            "amount": 1,
            "unit": "MINUTES"
          },
          "identities": [
            "6650f1a2b839d80068072332"
          ],
          "versions": [
            {}
          ],
          "cc": "",
          "conditions": {
            "field": "MAIL_REPLIED",
            "operator": "EQUAL"
          },
          "next": {
            "_id": "6650f1a2b839d800aa7d5d31",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "yes": {
            "_id": "6650f1a2b839d8006e15b9fb",
            "stepType": "START",
            "delay": {
              "unit": "MINUTES"
            },
            "identities": [],
            "versions": [],
            "cc": "",
            "conditions": {
              "operator": "EQUAL"
            },
            "next": {
              "stepType": "START"
            },
            "yes": {
              "stepType": "START"
            },
            "no": {
              "stepType": "START"
            }
          },
          "no": {
            "_id": "6650f1a2b839d80076a1078f",
            "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"
}
```
