Set the contact lists of a campaign

PATCH
/advanced/campaigns/{campaignId}/recipients

Sets the FULL selection of lists (replace semantics): the campaign contacts become the contacts of lists, minus any contact whose email or LinkedIn URL appears in one of excludedLists. When excludedLists is omitted the current exclusion lists are kept. Allowed on a running campaign. A campaign cannot be started with more than 30,000 recipients. Create and fill lists with the Lists endpoints (/lists/...).

Authorization

apiKey
Authorization<token>

Your 48 character API key, sent as is (a Bearer prefix is tolerated). Create it at https://v3.emelia.io/settings/api.

In: header

Path Parameters

campaignId*string

Identifier of a multichannel campaign (24 hexadecimal characters), as returned by POST /advanced/campaigns or GET /advanced/campaigns.

Match^[0-9a-fA-F]{24}$

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/advanced/campaigns/6650f1a2b839d80011c5a0f1/recipients" \  -H "Authorization: YOUR_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "lists": [      "6650f1a2b839d80011c5b111"    ],    "excludedLists": [      "6650f1a2b839d80011c5b222"    ]  }'
{  "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": "6650f1a2b839d8005f79a1ea",      "stepType": "START",      "delay": {        "amount": 1,        "unit": "MINUTES"      },      "identities": [        "6650f1a2b839d80019b7c656"      ],      "versions": [        {          "_id": "6650f1a2b839d800d98bd779",          "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": "6650f1a2b839d8004eeead5d",        "stepType": "START",        "delay": {          "amount": 1,          "unit": "MINUTES"        },        "identities": [          "6650f1a2b839d800cbdb9385"        ],        "versions": [          {            "_id": "6650f1a2b839d80086508ae8",            "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": "6650f1a2b839d800dc53f8c4",          "stepType": "START",          "delay": {            "amount": 1,            "unit": "MINUTES"          },          "identities": [            "6650f1a2b839d800c69323a8"          ],          "versions": [            {}          ],          "cc": "",          "conditions": {            "field": "MAIL_REPLIED",            "operator": "EQUAL"          },          "next": {            "_id": "6650f1a2b839d8008ab805db",            "stepType": "START",            "delay": {              "unit": "MINUTES"            },            "identities": [],            "versions": [],            "cc": "",            "conditions": {              "operator": "EQUAL"            },            "next": {              "stepType": "START"            },            "yes": {              "stepType": "START"            },            "no": {              "stepType": "START"            }          },          "yes": {            "_id": "6650f1a2b839d80007185491",            "stepType": "START",            "delay": {              "unit": "MINUTES"            },            "identities": [],            "versions": [],            "cc": "",            "conditions": {              "operator": "EQUAL"            },            "next": {              "stepType": "START"            },            "yes": {              "stepType": "START"            },            "no": {              "stepType": "START"            }          },          "no": {            "_id": "6650f1a2b839d800c17a3475",            "stepType": "START",            "delay": {              "unit": "MINUTES"            },            "identities": [],            "versions": [],            "cc": "",            "conditions": {              "operator": "EQUAL"            },            "next": {              "stepType": "START"            },            "yes": {              "stepType": "START"            },            "no": {              "stepType": "START"            }          }        },        "yes": {          "_id": "6650f1a2b839d800bcf039cc",          "stepType": "START",          "delay": {            "amount": 1,            "unit": "MINUTES"          },          "identities": [            "6650f1a2b839d8004ffc2d10"          ],          "versions": [            {}          ],          "cc": "",          "conditions": {            "field": "MAIL_REPLIED",            "operator": "EQUAL"          },          "next": {            "_id": "6650f1a2b839d8007ca5dd23",            "stepType": "START",            "delay": {              "unit": "MINUTES"            },            "identities": [],            "versions": [],            "cc": "",            "conditions": {              "operator": "EQUAL"            },            "next": {              "stepType": "START"            },            "yes": {              "stepType": "START"            },            "no": {              "stepType": "START"            }          },          "yes": {            "_id": "6650f1a2b839d800ea5bb359",            "stepType": "START",            "delay": {              "unit": "MINUTES"            },            "identities": [],            "versions": [],            "cc": "",            "conditions": {              "operator": "EQUAL"            },            "next": {              "stepType": "START"            },            "yes": {              "stepType": "START"            },            "no": {              "stepType": "START"            }          },          "no": {            "_id": "6650f1a2b839d80028be99dd",            "stepType": "START",            "delay": {              "unit": "MINUTES"            },            "identities": [],            "versions": [],            "cc": "",            "conditions": {              "operator": "EQUAL"            },            "next": {              "stepType": "START"            },            "yes": {              "stepType": "START"            },            "no": {              "stepType": "START"            }          }        },        "no": {          "_id": "6650f1a2b839d800abb3302e",          "stepType": "START",          "delay": {            "amount": 1,            "unit": "MINUTES"          },          "identities": [            "6650f1a2b839d8004274892a"          ],          "versions": [            {}          ],          "cc": "",          "conditions": {            "field": "MAIL_REPLIED",            "operator": "EQUAL"          },          "next": {            "_id": "6650f1a2b839d800b9d920a9",            "stepType": "START",            "delay": {              "unit": "MINUTES"            },            "identities": [],            "versions": [],            "cc": "",            "conditions": {              "operator": "EQUAL"            },            "next": {              "stepType": "START"            },            "yes": {              "stepType": "START"            },            "no": {              "stepType": "START"            }          },          "yes": {            "_id": "6650f1a2b839d800ff6e1d93",            "stepType": "START",            "delay": {              "unit": "MINUTES"            },            "identities": [],            "versions": [],            "cc": "",            "conditions": {              "operator": "EQUAL"            },            "next": {              "stepType": "START"            },            "yes": {              "stepType": "START"            },            "no": {              "stepType": "START"            }          },          "no": {            "_id": "6650f1a2b839d8003b8a62e7",            "stepType": "START",            "delay": {              "unit": "MINUTES"            },            "identities": [],            "versions": [],            "cc": "",            "conditions": {              "operator": "EQUAL"            },            "next": {              "stepType": "START"            },            "yes": {              "stepType": "START"            },            "no": {              "stepType": "START"            }          }        }      },      "yes": {        "_id": "6650f1a2b839d8007e35934f",        "stepType": "START",        "delay": {          "amount": 1,          "unit": "MINUTES"        },        "identities": [          "6650f1a2b839d80093c902bf"        ],        "versions": [          {            "_id": "6650f1a2b839d800ded77632",            "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": "6650f1a2b839d8007634f47a",          "stepType": "START",          "delay": {            "amount": 1,            "unit": "MINUTES"          },          "identities": [            "6650f1a2b839d8000eebcc26"          ],          "versions": [            {}          ],          "cc": "",          "conditions": {            "field": "MAIL_REPLIED",            "operator": "EQUAL"          },          "next": {            "_id": "6650f1a2b839d80028e8fb4d",            "stepType": "START",            "delay": {              "unit": "MINUTES"            },            "identities": [],            "versions": [],            "cc": "",            "conditions": {              "operator": "EQUAL"            },            "next": {              "stepType": "START"            },            "yes": {              "stepType": "START"            },            "no": {              "stepType": "START"            }          },          "yes": {            "_id": "6650f1a2b839d8005ccb575f",            "stepType": "START",            "delay": {              "unit": "MINUTES"            },            "identities": [],            "versions": [],            "cc": "",            "conditions": {              "operator": "EQUAL"            },            "next": {              "stepType": "START"            },            "yes": {              "stepType": "START"            },            "no": {              "stepType": "START"            }          },          "no": {            "_id": "6650f1a2b839d800dad59cd3",            "stepType": "START",            "delay": {              "unit": "MINUTES"            },            "identities": [],            "versions": [],            "cc": "",            "conditions": {              "operator": "EQUAL"            },            "next": {              "stepType": "START"            },            "yes": {              "stepType": "START"            },            "no": {              "stepType": "START"            }          }        },        "yes": {          "_id": "6650f1a2b839d800bd136f1e",          "stepType": "START",          "delay": {            "amount": 1,            "unit": "MINUTES"          },          "identities": [            "6650f1a2b839d80011e1379a"          ],          "versions": [            {}          ],          "cc": "",          "conditions": {            "field": "MAIL_REPLIED",            "operator": "EQUAL"          },          "next": {            "_id": "6650f1a2b839d8002628a479",            "stepType": "START",            "delay": {              "unit": "MINUTES"            },            "identities": [],            "versions": [],            "cc": "",            "conditions": {              "operator": "EQUAL"            },            "next": {              "stepType": "START"            },            "yes": {              "stepType": "START"            },            "no": {              "stepType": "START"            }          },          "yes": {            "_id": "6650f1a2b839d80098753403",            "stepType": "START",            "delay": {              "unit": "MINUTES"            },            "identities": [],            "versions": [],            "cc": "",            "conditions": {              "operator": "EQUAL"            },            "next": {              "stepType": "START"            },            "yes": {              "stepType": "START"            },            "no": {              "stepType": "START"            }          },          "no": {            "_id": "6650f1a2b839d80009f7ed37",            "stepType": "START",            "delay": {              "unit": "MINUTES"            },            "identities": [],            "versions": [],            "cc": "",            "conditions": {              "operator": "EQUAL"            },            "next": {              "stepType": "START"            },            "yes": {              "stepType": "START"            },            "no": {              "stepType": "START"            }          }        },        "no": {          "_id": "6650f1a2b839d800ffb34748",          "stepType": "START",          "delay": {            "amount": 1,            "unit": "MINUTES"          },          "identities": [            "6650f1a2b839d800b0d9973c"          ],          "versions": [            {}          ],          "cc": "",          "conditions": {            "field": "MAIL_REPLIED",            "operator": "EQUAL"          },          "next": {            "_id": "6650f1a2b839d800eafa6e97",            "stepType": "START",            "delay": {              "unit": "MINUTES"            },            "identities": [],            "versions": [],            "cc": "",            "conditions": {              "operator": "EQUAL"            },            "next": {              "stepType": "START"            },            "yes": {              "stepType": "START"            },            "no": {              "stepType": "START"            }          },          "yes": {            "_id": "6650f1a2b839d8006ef115d5",            "stepType": "START",            "delay": {              "unit": "MINUTES"            },            "identities": [],            "versions": [],            "cc": "",            "conditions": {              "operator": "EQUAL"            },            "next": {              "stepType": "START"            },            "yes": {              "stepType": "START"            },            "no": {              "stepType": "START"            }          },          "no": {            "_id": "6650f1a2b839d8002132d1d9",            "stepType": "START",            "delay": {              "unit": "MINUTES"            },            "identities": [],            "versions": [],            "cc": "",            "conditions": {              "operator": "EQUAL"            },            "next": {              "stepType": "START"            },            "yes": {              "stepType": "START"            },            "no": {              "stepType": "START"            }          }        }      },      "no": {        "_id": "6650f1a2b839d8003d6e0823",        "stepType": "START",        "delay": {          "amount": 1,          "unit": "MINUTES"        },        "identities": [          "6650f1a2b839d80006399af3"        ],        "versions": [          {            "_id": "6650f1a2b839d800c7136ed6",            "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": "6650f1a2b839d8001f6e1686",          "stepType": "START",          "delay": {            "amount": 1,            "unit": "MINUTES"          },          "identities": [            "6650f1a2b839d80037fc9862"          ],          "versions": [            {}          ],          "cc": "",          "conditions": {            "field": "MAIL_REPLIED",            "operator": "EQUAL"          },          "next": {            "_id": "6650f1a2b839d80060464f41",            "stepType": "START",            "delay": {              "unit": "MINUTES"            },            "identities": [],            "versions": [],            "cc": "",            "conditions": {              "operator": "EQUAL"            },            "next": {              "stepType": "START"            },            "yes": {              "stepType": "START"            },            "no": {              "stepType": "START"            }          },          "yes": {            "_id": "6650f1a2b839d800edc8746b",            "stepType": "START",            "delay": {              "unit": "MINUTES"            },            "identities": [],            "versions": [],            "cc": "",            "conditions": {              "operator": "EQUAL"            },            "next": {              "stepType": "START"            },            "yes": {              "stepType": "START"            },            "no": {              "stepType": "START"            }          },          "no": {            "_id": "6650f1a2b839d8005df9a81f",            "stepType": "START",            "delay": {              "unit": "MINUTES"            },            "identities": [],            "versions": [],            "cc": "",            "conditions": {              "operator": "EQUAL"            },            "next": {              "stepType": "START"            },            "yes": {              "stepType": "START"            },            "no": {              "stepType": "START"            }          }        },        "yes": {          "_id": "6650f1a2b839d800d995c4a2",          "stepType": "START",          "delay": {            "amount": 1,            "unit": "MINUTES"          },          "identities": [            "6650f1a2b839d8009306214e"          ],          "versions": [            {}          ],          "cc": "",          "conditions": {            "field": "MAIL_REPLIED",            "operator": "EQUAL"          },          "next": {            "_id": "6650f1a2b839d8003846edf5",            "stepType": "START",            "delay": {              "unit": "MINUTES"            },            "identities": [],            "versions": [],            "cc": "",            "conditions": {              "operator": "EQUAL"            },            "next": {              "stepType": "START"            },            "yes": {              "stepType": "START"            },            "no": {              "stepType": "START"            }          },          "yes": {            "_id": "6650f1a2b839d800403ffbc7",            "stepType": "START",            "delay": {              "unit": "MINUTES"            },            "identities": [],            "versions": [],            "cc": "",            "conditions": {              "operator": "EQUAL"            },            "next": {              "stepType": "START"            },            "yes": {              "stepType": "START"            },            "no": {              "stepType": "START"            }          },          "no": {            "_id": "6650f1a2b839d8000044905b",            "stepType": "START",            "delay": {              "unit": "MINUTES"            },            "identities": [],            "versions": [],            "cc": "",            "conditions": {              "operator": "EQUAL"            },            "next": {              "stepType": "START"            },            "yes": {              "stepType": "START"            },            "no": {              "stepType": "START"            }          }        },        "no": {          "_id": "6650f1a2b839d800e53fa85c",          "stepType": "START",          "delay": {            "amount": 1,            "unit": "MINUTES"          },          "identities": [            "6650f1a2b839d80079f2d760"          ],          "versions": [            {}          ],          "cc": "",          "conditions": {            "field": "MAIL_REPLIED",            "operator": "EQUAL"          },          "next": {            "_id": "6650f1a2b839d80023970813",            "stepType": "START",            "delay": {              "unit": "MINUTES"            },            "identities": [],            "versions": [],            "cc": "",            "conditions": {              "operator": "EQUAL"            },            "next": {              "stepType": "START"            },            "yes": {              "stepType": "START"            },            "no": {              "stepType": "START"            }          },          "yes": {            "_id": "6650f1a2b839d8002fe1dea9",            "stepType": "START",            "delay": {              "unit": "MINUTES"            },            "identities": [],            "versions": [],            "cc": "",            "conditions": {              "operator": "EQUAL"            },            "next": {              "stepType": "START"            },            "yes": {              "stepType": "START"            },            "no": {              "stepType": "START"            }          },          "no": {            "_id": "6650f1a2b839d800311ab70d",            "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"  }}