Upload contacts CSV
curl --request POST \
--url https://prod-platform-core-api.20x.business/api/v1/contact-lists/{id}/upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://prod-platform-core-api.20x.business/api/v1/contact-lists/{id}/upload"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://prod-platform-core-api.20x.business/api/v1/contact-lists/{id}/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Contact Lists
Upload contacts CSV
Bulk import contacts into a list from a CSV file
POST
/
contact-lists
/
{id}
/
upload
Upload contacts CSV
curl --request POST \
--url https://prod-platform-core-api.20x.business/api/v1/contact-lists/{id}/upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://prod-platform-core-api.20x.business/api/v1/contact-lists/{id}/upload"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://prod-platform-core-api.20x.business/api/v1/contact-lists/{id}/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Uploads a CSV spreadsheet containing contact phone numbers, names, emails, and custom metadata variables to populate a contact list.
Requirements & Limits
- Content-Type:
multipart/form-data - File extension:
.csv - Maximum rows: 500 contacts per upload
- Supported CSV Headers (case-insensitive, spaces or underscores):
phone_number/phone/mobile/customer_number(Required, E.164 format e.g.+919876543210or+14155552671)name/customer_name/contact_name/first_name(Optional)email(Optional, valid email address format)metadata(Optional, valid JSON string containing custom variables e.g.{"tier": "gold", "account_balance": 150})
Path parameters
string
required
The unique UUID of the target contact list.
Body parameters
file
required
The binary
.csv file to upload.curl -X POST https://prod-campaign-engine-api.20x.business/api/v1/contact-lists/33333333-3333-3333-3333-333333333333/upload \
-H "Authorization: Bearer $AGENTIC_OS_API_KEY" \
-F "file=@/path/to/leads.csv"
import requests
with open("leads.csv", "rb") as f:
response = requests.post(
"https://prod-campaign-engine-api.20x.business/api/v1/contact-lists/33333333-3333-3333-3333-333333333333/upload",
headers={"Authorization": f"Bearer {API_KEY}"},
files={"file": f},
)
print(response.json())
const formData = new FormData();
formData.append("file", fileBlob, "leads.csv");
const response = await fetch(
"https://prod-campaign-engine-api.20x.business/api/v1/contact-lists/33333333-3333-3333-3333-333333333333/upload",
{
method: "POST",
headers: { Authorization: `Bearer ${API_KEY}` },
body: formData,
},
);
const data = await response.json();
console.log(data);
Response
{
"imported": 48,
"skipped": 2,
"invalidRows": [
{
"row": 15,
"phone": "987654321",
"reason": "Invalid phone number length"
}
]
}

