Create Leads By Bulk Upload
curl --request POST \
--url https://api.eqho.ai/v1/leads/bulk-upload \
--header 'Content-Type: multipart/form-data' \
--header 'X-API-KEY: <api-key>' \
--header 'x-org-id: <api-key>' \
--form file='@example-file' \
--form 'lead_list_name=<string>' \
--form 'campaign=<string>'import requests
url = "https://api.eqho.ai/v1/leads/bulk-upload"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"lead_list_name": "<string>",
"campaign": "<string>"
}
headers = {
"X-API-KEY": "<api-key>",
"x-org-id": "<api-key>"
}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('lead_list_name', '<string>');
form.append('campaign', '<string>');
const options = {method: 'POST', headers: {'X-API-KEY': '<api-key>', 'x-org-id': '<api-key>'}};
options.body = form;
fetch('https://api.eqho.ai/v1/leads/bulk-upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.eqho.ai/v1/leads/bulk-upload"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"lead_list_name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"campaign\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("x-org-id", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"summary": {
"total_records": 123,
"successful_records": 123,
"error_records": 123
},
"errors": [
{
"line_number": 123,
"errors": [
"<string>"
]
}
]
}{
"detail": "Invalid CSV file or missing required columns"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Leads
Bulk Upload Leads
POST
/
v1
/
leads
/
bulk-upload
Create Leads By Bulk Upload
curl --request POST \
--url https://api.eqho.ai/v1/leads/bulk-upload \
--header 'Content-Type: multipart/form-data' \
--header 'X-API-KEY: <api-key>' \
--header 'x-org-id: <api-key>' \
--form file='@example-file' \
--form 'lead_list_name=<string>' \
--form 'campaign=<string>'import requests
url = "https://api.eqho.ai/v1/leads/bulk-upload"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"lead_list_name": "<string>",
"campaign": "<string>"
}
headers = {
"X-API-KEY": "<api-key>",
"x-org-id": "<api-key>"
}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('lead_list_name', '<string>');
form.append('campaign', '<string>');
const options = {method: 'POST', headers: {'X-API-KEY': '<api-key>', 'x-org-id': '<api-key>'}};
options.body = form;
fetch('https://api.eqho.ai/v1/leads/bulk-upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.eqho.ai/v1/leads/bulk-upload"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"lead_list_name\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"campaign\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("x-org-id", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"summary": {
"total_records": 123,
"successful_records": 123,
"error_records": 123
},
"errors": [
{
"line_number": 123,
"errors": [
"<string>"
]
}
]
}{
"detail": "Invalid CSV file or missing required columns"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}If you have large numbers of leads to upload, you can use the bulk upload endpoint.
This endpoint will process the leads in chunks and return the results of the processing.
Your CSV file should have the following columns:
phone- Required. Phone number in E.164 format. Must be US numbers. If duplicate numbers are found, the row will be skipped. Example:+18015551831email- Required. Email address. Example:[email protected]first_name- Required. First name. Example:Janelast_name- Required. Last name. Example:Smithtimezone- Required. Timezone. Example:US/Mountain
Authorizations
APIKeyHeader & OrgImpersonationOAuth2PasswordBearer & OrgImpersonation
Your API key for authentication.
Org impersonation via x-org-id. Superadmins may impersonate any org; admins may impersonate their direct sub-organizations. Enter the target organization ID to act as that org.
Was this page helpful?