Import contacts from a CSV
curl --request POST \
--url https://apiv2.vodex.ai/v1/contacts/imports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"csv": "<string>",
"filename": "<string>"
}
'import requests
url = "https://apiv2.vodex.ai/v1/contacts/imports"
payload = {
"csv": "<string>",
"filename": "<string>"
}
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({csv: '<string>', filename: '<string>'})
};
fetch('https://apiv2.vodex.ai/v1/contacts/imports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apiv2.vodex.ai/v1/contacts/imports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'csv' => '<string>',
'filename' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apiv2.vodex.ai/v1/contacts/imports"
payload := strings.NewReader("{\n \"csv\": \"<string>\",\n \"filename\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://apiv2.vodex.ai/v1/contacts/imports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"csv\": \"<string>\",\n \"filename\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.vodex.ai/v1/contacts/imports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"csv\": \"<string>\",\n \"filename\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"rows": 123,
"created": 123,
"updated": 123,
"rejected": 123,
"errors": [
{
"line": 123,
"message": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z"
}{
"error": "not found"
}Contacts
Import contacts from a CSV
Synchronous, in one transaction. A background worker would be right at a million rows; at the 50,000 ceiling it would only add a state machine and a polling UI to something that finishes in seconds — and a partially-applied import nobody can describe is worse than a slow request (0017 §7).
- Headers auto-map. An unrecognised column becomes a custom attribute rather than an error or a silent drop, so a CRM export lands with no mapping UI.
- Upsert on
externalRef, elseaccountNumber. Re-running the same export reports updates, not duplicates. - Channels merge, never replace. A second file listing only a mobile must not delete the work number the first one brought.
- A row must be identifiable — by a name, or by a key that can match an existing contact.
- Errors carry the FILE line number, which is what the customer’s editor shows. At most 200 are reported; beyond that the file is the wrong shape.
POST
/
contacts
/
imports
Import contacts from a CSV
curl --request POST \
--url https://apiv2.vodex.ai/v1/contacts/imports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"csv": "<string>",
"filename": "<string>"
}
'import requests
url = "https://apiv2.vodex.ai/v1/contacts/imports"
payload = {
"csv": "<string>",
"filename": "<string>"
}
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({csv: '<string>', filename: '<string>'})
};
fetch('https://apiv2.vodex.ai/v1/contacts/imports', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apiv2.vodex.ai/v1/contacts/imports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'csv' => '<string>',
'filename' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apiv2.vodex.ai/v1/contacts/imports"
payload := strings.NewReader("{\n \"csv\": \"<string>\",\n \"filename\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://apiv2.vodex.ai/v1/contacts/imports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"csv\": \"<string>\",\n \"filename\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.vodex.ai/v1/contacts/imports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"csv\": \"<string>\",\n \"filename\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"rows": 123,
"created": 123,
"updated": 123,
"rejected": 123,
"errors": [
{
"line": 123,
"message": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z"
}{
"error": "not found"
}Authorizations
Tenant API key (vdx_live_…) as Authorization: Bearer.
Response
The receipt: how many were created, updated and rejected, with the rejections carrying their file line.