Parse CSV
POST /lists/{id}/parse-csv
Upload a CSV file. 3AVA Mail’s AI mapper inspects the headers and a sample of rows, then proposes a mapping from CSV columns to canonical contact fields (email, first_name, last_name, phone, company, custom fields).
This endpoint does not import — it only previews. After reviewing the suggested mapping, call /import with any overrides to actually load the contacts.
Request
Section titled “Request”multipart/form-data:
| Field | Description |
|---|---|
file | The CSV file (max 100MB). |
Example
Section titled “Example”curl -X POST https://mail.3ava.com/api/lists/list_a1b2.../parse-csv \ -H "Authorization: Bearer am_YOUR_KEY" \import requests
with open("contacts.csv", "rb") as f: r = requests.post( "https://mail.3ava.com/api/lists/list_a1b2.../parse-csv", headers={"Authorization": "Bearer am_YOUR_KEY"}, files={"file": f}, )print(r.json())Response
Section titled “Response”{ "import_id": "imp_z9y8...", "filename": "contacts.csv", "total_rows": 21034, "headers": ["Email Address", "First Name", "Last Name", "State", "Phone"], "sample_rows": [ ], "ai_mapping": { "email": "Email Address", "first_name": "First Name", "last_name": "Last Name", "phone": "Phone", "custom_fields.state": "State" }, "email_extras": [], "phone_extras": []}