Mass assign leads

Assign many leads to a campaign in a single request.

When to use. Bulk-add leads to a campaign, selecting them by a filter instead of one at a time. To take leads off a campaign, use PUT /campaign-leads/mass-unassign.

Parameters.

  • campaign_id (integer, required): the campaign to assign the matched leads to.
  • where (object, required): conditions that select the leads to assign. Any lead field may be used, and each value may be a single value (exact match) or an array (matches any of the listed values). Common fields are id, first_name, last_name, phone, email, city, state, zip, original_identifier.
  • remove_from_others (boolean): when true, the matched leads are also removed from every other campaign.

Returns. { "leads": { "<campaign-lead id>": { ...lead }, "errors": [ ... ] } }. Successfully assigned leads are keyed by the new campaign-lead ID, and any leads that could not be assigned are collected under errors.

Example.

{ "campaign_id": 12, "remove_from_others": true, "where": { "id": [1, 2, 3] } }
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Dialer Name (subdomain)

Body Params
where
object
required

Filter conditions selecting the leads to assign. Any lead field may be used; a value may be a scalar (equals) or an array (IN).

integer
required

Campaign to assign the matched leads to.

Remove the matched leads from other campaigns (true = remove, false = skip).

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json