Append rows from a CSV
curl --request POST \
--url https://apiv2.vodex.ai/v1/batches/{id}/rows.csv \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: text/csv' \
--data 'to,rowRef,name,balance
+14155551234,acct_991,Dana,120.50
'import requests
url = "https://apiv2.vodex.ai/v1/batches/{id}/rows.csv"
payload = "to,rowRef,name,balance\n+14155551234,acct_991,Dana,120.50\n"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "text/csv"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'text/csv'},
body: 'to,rowRef,name,balance\n+14155551234,acct_991,Dana,120.50\n'
};
fetch('https://apiv2.vodex.ai/v1/batches/{id}/rows.csv', 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/batches/{id}/rows.csv",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "to,rowRef,name,balance\n+14155551234,acct_991,Dana,120.50\n",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: text/csv"
],
]);
$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/batches/{id}/rows.csv"
payload := strings.NewReader("to,rowRef,name,balance\n+14155551234,acct_991,Dana,120.50\n")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "text/csv")
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/batches/{id}/rows.csv")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "text/csv")
.body("to,rowRef,name,balance\n+14155551234,acct_991,Dana,120.50\n")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.vodex.ai/v1/batches/{id}/rows.csv")
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"] = 'text/csv'
request.body = "to,rowRef,name,balance\n+14155551234,acct_991,Dana,120.50\n"
response = http.request(request)
puts response.read_body{
"added": 123,
"rejected": [
{
"index": 123,
"rowRef": "<string>",
"to": "<string>",
"reason": "<string>"
}
],
"counts": {}
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "<string>",
"rejected": [
{
"index": 123,
"rowRef": "<string>",
"to": "<string>",
"reason": "<string>"
}
]
}Batches
Append rows from a CSV
A raw text/csv body, not a JSON envelope. Every column that is not a
known field (rowRef, to/toE164, assistantId, from) becomes a
variable — that is the whole ergonomic point: export
to,name,balance,tz from your CRM and it works, with no mapping UI to
build and none to learn.
Admission is the same function the JSON path uses. Parse errors are rejections too, and they carry the line number the customer’s editor shows them. Up to 100,000 rows (higher than the JSON ceiling on purpose) and a 32 MB body.
POST
/
batches
/
{id}
/
rows.csv
Append rows from a CSV
curl --request POST \
--url https://apiv2.vodex.ai/v1/batches/{id}/rows.csv \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: text/csv' \
--data 'to,rowRef,name,balance
+14155551234,acct_991,Dana,120.50
'import requests
url = "https://apiv2.vodex.ai/v1/batches/{id}/rows.csv"
payload = "to,rowRef,name,balance\n+14155551234,acct_991,Dana,120.50\n"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "text/csv"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'text/csv'},
body: 'to,rowRef,name,balance\n+14155551234,acct_991,Dana,120.50\n'
};
fetch('https://apiv2.vodex.ai/v1/batches/{id}/rows.csv', 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/batches/{id}/rows.csv",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "to,rowRef,name,balance\n+14155551234,acct_991,Dana,120.50\n",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: text/csv"
],
]);
$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/batches/{id}/rows.csv"
payload := strings.NewReader("to,rowRef,name,balance\n+14155551234,acct_991,Dana,120.50\n")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "text/csv")
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/batches/{id}/rows.csv")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "text/csv")
.body("to,rowRef,name,balance\n+14155551234,acct_991,Dana,120.50\n")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.vodex.ai/v1/batches/{id}/rows.csv")
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"] = 'text/csv'
request.body = "to,rowRef,name,balance\n+14155551234,acct_991,Dana,120.50\n"
response = http.request(request)
puts response.read_body{
"added": 123,
"rejected": [
{
"index": 123,
"rowRef": "<string>",
"to": "<string>",
"reason": "<string>"
}
],
"counts": {}
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "<string>",
"rejected": [
{
"index": 123,
"rowRef": "<string>",
"to": "<string>",
"reason": "<string>"
}
]
}