Skip to main content

Adding Leads

Adding leads to an active campaign will take up to 5 minutes for the leads to get synced.This ensures that there is no interruption to the campaigns sending.

Adding leads from existing list

Send a POST request to the following endpoint.
/api/campaigns/{campaign_id}/leads/attach-lead-list
The request takes 1 required body parameter:
lead_list_id
integer
required
The ID of the lead list to add
An example of this request:
curl 'https://dedi.emailbison.com/api/campaigns/6/leads/attach-lead-list' \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "lead_list_id": 1
}'
fetch('https://dedi.emailbison.com/api/campaigns/6/leads/attach-lead-list', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Authorization: 'Bearer YOUR_SECRET_TOKEN'
  },
  body: JSON.stringify({
    lead_list_id: 1
  })
})
headers = {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_SECRET_TOKEN',
}

json_data = {
    'lead_list_id': 1,
}

response = requests.post(
    'https://dedi.emailbison.com/api/campaigns/6/leads/attach-lead-list',
    headers=headers,
    json=json_data,
)

Adding leads by their IDs

You can also add individual leads to a campiagn using the lead IDs.Send a POST request to the following endpoint.
/api/campaigns/{campaign_id}/leads/attach-leads
The request takes 1 required body parameter:
lead_ids
array
required
An array containing the IDs of the leads to add
An example of this request:
curl 'https://dedi.emailbison.com/api/campaigns/6/leads/attach-leads' \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "lead_ids": [1,2,3]
}'
fetch('https://dedi.emailbison.com/api/campaigns/6/leads/attach-leads', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Authorization: 'Bearer YOUR_SECRET_TOKEN'
  },
  body: JSON.stringify({
    lead_ids: [1, 2, 3]
  })
})
headers = {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_SECRET_TOKEN',
}

json_data = {
    'lead_ids': [1,2,3,],
}

response = requests.post('https://dedi.emailbison.com/api/campaigns/6/leads/attach-leads', headers=headers, json=json_data)