POST /api/v1/public/lead-lists/:id/add-to-campaign/
Add prospects from a lead list to a campaign using their prospect IDs. This allows you to move prospects from a lead list directly into a campaign for outreach. Auth:X-API-Key
Path Parameters
id(integer, required): Lead list ID (the source lead list containing the prospects)
Request Body
Request Body Parameters
campaign(integer, required): The target campaign ID to add prospects toprospect_ids(array of integers, optional): Array of prospect IDs from the lead list to add to the campaign. If empty or omitted, will add prospects based onamountparameter. Defaults to[]amount(integer, optional): Number of prospects to add ifprospect_idsis empty. Defaults to0(which means all matching prospects)allow_duplicates(boolean, optional): Whether to allow adding prospects that are already in other campaigns. Defaults tofalseprospects_per_company(integer, optional): Maximum number of prospects per company to add. Useful for limiting multiple contacts from the same company. Defaults to1filters(object, optional): Additional filters to apply when selecting prospects. Defaults to{}sort_field(string, optional): Field to sort prospects by. Defaults to"id"sort_direction(string, optional): Sort direction -"asc"or"desc". Defaults to"asc"activate(boolean, optional): Iftrueand the campaign is ACTIVE, immediately schedule these prospects for outreach. Defaults tofalse
campaign field is required. All other fields are optional and will use sensible defaults if not provided.
Response
Response Fields
success(boolean): Whether the operation was successfulcount(integer): Number of prospects successfully added to the campaignprospects(array): Array of prospect objects that were added (includes full prospect details)warning(string, optional): Warning message if activation was requested but couldn’t be completed (e.g., campaign is in DRAFT status)
Error Responses
400 Bad Request
404 Not Found
Workflow Example
This endpoint is useful for the following workflow:- Create a lead list
- Search for prospects and add them to the lead list
- Optionally enrich the prospects in the lead list
- Use this endpoint to move selected prospects from the lead list to a campaign
- Campaign is ready to launch with those prospects
Example Usage
Minimal Request (Just Campaign ID)
The simplest possible request - onlycampaign is required:
Add Specific Prospects by ID
Add First N Prospects from Lead List
Python Example
JavaScript Example
Notes
- Prospects can only be in one campaign at a time. When you add a prospect to a campaign, they are moved from their current location (lead list or previous campaign)
- If
allow_duplicatesisfalse, the endpoint will skip prospects that are already in other campaigns - The
prospects_per_companyparameter helps you limit the number of contacts from the same company, which is useful for avoiding over-contacting a single organization - Setting
activate: truewill immediately schedule the prospects for outreach if the campaign status is ACTIVE. If the campaign is DRAFT or PAUSED, the prospects will be added but not scheduled - If the lead list doesn’t have enough prospects to fulfill the
amountrequested, all available prospects will be added
