leads_bulk_selection_action
The "Select all N leads in this list" counterpart of the per-sqid bulk endpoints. selection is the lead list's query parameters (segment, filter, view, q, import_id, status, qf); the job acts on every lead the list returns for them, resolved once when it starts.
action and the endpoint it behaves like:
add_to_segment(segment_sqid,newcreates a list) —leads_bulk_add_to_segment_bulkremove_from_segment(segment_sqid) —leads_bulk_remove_from_segmentadd_to_campaign(campaign_sqid) —campaigns_add_leadsreset—leads_bulk_reset_to_newarchive—leads_bulk_archivedelete—leads_bulk_delete; refused unless the selection is narrowed, so an empty one cannot wipe the workspace
Like the list, an empty status leaves ARCHIVED leads out; pass __all__ to include them. Runs in the background: 202 with task_sqid; the finished job's result has done_count and skipped counted by reason code. E.g. {"action": "delete", "selection": {"import_id": "nlppkx"}} removes one CSV import.
Method: POST /api/v1/workspaces/{workspace_sqid}/leads/bulk-selection/
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": {
"action": "<action>",
"selection": "<selection>"
},
"name": "leads_bulk_selection_action"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Which bulk action to run; each behaves like its per-sqid endpoint. * `add_to_segment` - add_to_segment * `remove_from_segment` - remove_from_segment * `add_to_campaign` - add_to_campaign * `reset` - reset * `archive` - archive * `delete` - delete | |
| selection | Yes | The lead list's query parameters; every lead the list returns, across all pages, is acted on. | |
| segment_sqid | No | For add_to_segment / remove_from_segment. `new` creates a list for add_to_segment. | |
| campaign_sqid | No | For add_to_campaign. |