Add prospects to a campaign
add_videosAdd prospects (leads) to a Pitchlane campaign: one video is made per lead row, 1 to 500 per call. Each row is keyed exactly as get_campaign's import_fields.add_videos_columns lists (the campaign's mapped column names, e.g. First Name, not variable names unless the two are the same; see import_fields.example_row). If that is null the campaign is not set up for this yet: add the first lead with create_or_update_video. Rows that fail are skipped and listed in variableIssues by row index; duplicates of existing leads are skipped. Make the test video first, from one lead with create_or_update_video, and add the rest here once the user has approved it. render: all asks to render every video this call adds (needs an approved test video and uses credits; poll the returned job_id with get_render_job, or inspect the render error); none only stores them, to render later with render_campaign or render_video. The answer keeps the leads imported apart from the render request.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"campaign_id": "<campaign_id>",
"leads": "<leads>",
"render": "<render>"
},
"name": "add_videos"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| leads | Yes | The leads, one object per prospect, keyed by get_campaign's `import_fields.add_videos_columns`, e.g. [{"First Name":"Ada","Company URL":"https://example.com"}]. `originalRowIndex` may give the row's number in the user's data. | |
| render | Yes | `all`: ask to render every video this call adds (needs an approved test video and credits; confirm with the user first). `none`: store only; render them later with render_campaign or render_video. | |
| campaign_id | Yes | The campaign's id, as list_campaigns returns it, e.g. `o6duFik0_UNSUGPCn1LTm`. | |
| title_template | No | A template for the videos' titles, e.g. `Video for {{first_name}}`. It also becomes the campaign's title template. | |
| duplicate_field | No | The lead field that makes a row a duplicate of an existing video, e.g. `email`. The campaign's own setting when left out. |