Import contacts from a CSV
const url = 'https://api.vocapable.com/v1/contact-imports';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"file_name":"example","content":"example","column_mapping":{"additionalProperty":"phone_e164"},"consent_attestation":{"signer_name":"example","signer_title":"example","affirmation":"example","consent_basis":"pewc"},"target_list_id":"example","list_name":"example","on_duplicate":"reject"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.vocapable.com/v1/contact-imports \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "file_name": "example", "content": "example", "column_mapping": { "additionalProperty": "phone_e164" }, "consent_attestation": { "signer_name": "example", "signer_title": "example", "affirmation": "example", "consent_basis": "pewc" }, "target_list_id": "example", "list_name": "example", "on_duplicate": "reject" }'Land a CSV in a contact list and report every row that could not be taken.
Answered at 202 with the documented poll contract on GET /contact-imports/{id}; the
P1 import runs inside this request, so the job is already terminal when it answers.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”An import submission.
The CSV arrives as a text field rather than multipart/form-data: multipart needs
python-multipart, which is not a workspace dependency. The parser takes the file’s
text either way, so the wire shape can change without touching it.
object
object
What the tenant affirms about the list they are uploading.
Required on every import: the affirmation is the evidence linking each later dial to a named human who declared the consent basis (docs/03-domain-model.md §Audience).
object
CANON fact 18 - the four consent classes (docs/07-compliance.md §consent).
Responses
Section titled “Responses”Successful Response
object
Lifecycle shared by the async import and export jobs.
object
The stored attestation. signer_ip and signed_at are stamped by the API - a
client-supplied timestamp is a claim, not evidence.
object
CANON fact 18 - the four consent classes (docs/07-compliance.md §consent).
Example
{ "status": "queued", "consent_attestation": { "consent_basis": "pewc" }, "rows_skipped": 0, "on_duplicate": "reject"}Validation Error
object
object
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}