Contacts operations span five workflow families.
Use these families together rather than as isolated endpoints:
- Contacts CRUD
- Contact imports
- Contact exports
- Contact segments
- Compliance/DNC and erasure flows
Core CRUD and dedupe
curl "https://api.callaro.ai/api/v1/contacts?page=1&per_page=50&search=rahul" -H "X-Api-Key: $CALLARO_API_KEY"
curl -X POST "https://api.callaro.ai/api/v1/contacts" -H "X-Api-Key: $CALLARO_API_KEY" -H "Content-Type: application/json" -d '{"phone_e164":"+919900000001","first_name":"Rahul","email":"rahul@example.com","company":"Acme Realty"}'
curl "https://api.callaro.ai/api/v1/contacts/duplicates" -H "X-Api-Key: $CALLARO_API_KEY"
curl -X POST "https://api.callaro.ai/api/v1/contacts/501/merge" -H "X-Api-Key: $CALLARO_API_KEY" -H "Content-Type: application/json" -d '{"secondary_ids":[502,503]}'
await fetch('https://api.callaro.ai/api/v1/contacts?page=1&per_page=50&search=rahul', { headers: { 'X-Api-Key': process.env.CALLARO_API_KEY } });
await fetch('https://api.callaro.ai/api/v1/contacts', {
method: 'POST',
headers: { 'X-Api-Key': process.env.CALLARO_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({ phone_e164: '+919900000001', first_name: 'Rahul', email: 'rahul@example.com', company: 'Acme Realty' })
});
await fetch('https://api.callaro.ai/api/v1/contacts/duplicates', { headers: { 'X-Api-Key': process.env.CALLARO_API_KEY } });
Imports and exports
curl -X POST "https://api.callaro.ai/api/v1/contacts/import" -H "X-Api-Key: $CALLARO_API_KEY" -F "file=@contacts.csv" -F 'column_mapping={"Phone":"phone_e164","First Name":"first_name"}'
curl "https://api.callaro.ai/api/v1/contact-imports" -H "X-Api-Key: $CALLARO_API_KEY"
curl "https://api.callaro.ai/api/v1/contact-imports/77/error_report" -H "X-Api-Key: $CALLARO_API_KEY"
curl -X POST "https://api.callaro.ai/api/v1/contact-exports" -H "X-Api-Key: $CALLARO_API_KEY" -H "Content-Type: application/json" -d '{"filters":{"segment_id":19}}'
curl "https://api.callaro.ai/api/v1/contact-exports/44/download" -H "X-Api-Key: $CALLARO_API_KEY"
const formData = new FormData();
formData.append('file', new Blob(['Phone,First Name
+919900000001,Rahul'], { type: 'text/csv' }), 'contacts.csv');
formData.append('column_mapping', JSON.stringify({ Phone: 'phone_e164', 'First Name': 'first_name' }));
await fetch('https://api.callaro.ai/api/v1/contacts/import', { method: 'POST', headers: { 'X-Api-Key': process.env.CALLARO_API_KEY }, body: formData });
await fetch('https://api.callaro.ai/api/v1/contact-exports', {
method: 'POST',
headers: { 'X-Api-Key': process.env.CALLARO_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({ filters: { segment_id: 19 } })
});
Segments and compliance
- Segment APIs:
GET/POST /api/v1/contact_segments, GET /api/v1/contact_segments/{id}/contacts
- Contact data export:
GET /api/v1/contacts/{id}/data_export
- Erasure flows:
DELETE /api/v1/contacts/{id}/gdpr_delete, DELETE /api/v1/contacts/{id}/hard_delete
Operator workflow checklist
- Validate CSV column mapping on a small test file.
- Review duplicate groups before merge.
- Assign contacts to segments used by campaign targeting.
- Validate DNC/compliance suppression before launch.
- Export sample contact set and verify downstream schema.
hard_delete is irreversible and should be restricted to controlled administrative workflows. Prefer logical delete or GDPR-specific flows where policy requires an audit trail.