Inject leads in bulk (auto-chunked by 500)
inject_leads_batchBulk-inject leads into VoIPSense lists or campaigns, creating/reusing lists, attaching campaigns, and enrolling agents. Idempotent by phone number per list for safe resends.
Instructions
POST /v1/leads/batch (permission callcenter:write). End-to-end provisioning in one call: create/reuse a list, attach it to a campaign (create it if needed), enroll agents, and inject leads. More than 500 leads are automatically split into batches of 500 and the totals are aggregated. Idempotent by phone number per list: safe to resend the full file every cycle. Without any campaign field the leads go to a plain list ("Mes listes" mode).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| leads | Yes | Leads to inject. Any size; sent in batches of 500. | |
| agents | No | Explicit agents to enroll on the campaign: extension number, email or user id (e.g. ["111201","sara@client.ma"]). If none is valid → 400 and nothing is written. | |
| listId | No | Target list: UUID or the list number shown in the console (e.g. 101). Use listId OR listName. | |
| listName | No | Target list by exact name. Combine with createList=true to create it if missing. | |
| campaignId | No | Attach the list to an existing campaign by id. | |
| createList | No | Create the list named listName if it does not exist. | |
| dialMethod | No | Dial mode for a newly created campaign. Default PREVIEW. MANUAL serves no leads; PROGRESSIVE/PREDICTIVE auto-dial. | |
| campaignName | No | Attach the list to a campaign by name. Combine with createCampaign=true to create it. | |
| outboundLine | No | With createList: exact name or id of an active line (trunk) used for every call from this list. Always overrides the campaign line. 400 if unknown/inactive. | |
| createCampaign | No | Create campaignName if missing (OUTBOUND / PREVIEW / ACTIVE: the console serves leads to agents automatically). | |
| updateIfExists | No | Update fields of a contact already in the list instead of ignoring it (status/attempts/history are never touched). | |
| assignAllAgents | No | Enroll all active agents of the organization. Ignored if agents is provided. |