curl --request POST \
--url https://apiv2.vodex.ai/v1/batches \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"name": "<string>",
"assistantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"concurrency": 10,
"retry": {
"on": [
"<string>"
],
"attempts": 5,
"backoffMinutes": 5040.5
},
"window": {
"timezone": "America/New_York",
"start": "09:00",
"end": "20:00",
"days": [
3
]
},
"suppress": [
"<string>"
],
"from": {
"strategy": "sticky",
"numbers": [
{
"e164": "<string>",
"weight": 1
}
]
},
"rows": [
{
"to": "<string>",
"rowRef": "<string>",
"assistantId": "<string>",
"from": "<string>",
"variables": {}
}
],
"startPaused": false
}
'import requests
url = "https://apiv2.vodex.ai/v1/batches"
payload = {
"name": "<string>",
"assistantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"concurrency": 10,
"retry": {
"on": ["<string>"],
"attempts": 5,
"backoffMinutes": 5040.5
},
"window": {
"timezone": "America/New_York",
"start": "09:00",
"end": "20:00",
"days": [3]
},
"suppress": ["<string>"],
"from": {
"strategy": "sticky",
"numbers": [
{
"e164": "<string>",
"weight": 1
}
]
},
"rows": [
{
"to": "<string>",
"rowRef": "<string>",
"assistantId": "<string>",
"from": "<string>",
"variables": {}
}
],
"startPaused": False
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
assistantId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
concurrency: 10,
retry: {on: ['<string>'], attempts: 5, backoffMinutes: 5040.5},
window: {timezone: 'America/New_York', start: '09:00', end: '20:00', days: [3]},
suppress: ['<string>'],
from: {strategy: 'sticky', numbers: [{e164: '<string>', weight: 1}]},
rows: [
{
to: '<string>',
rowRef: '<string>',
assistantId: '<string>',
from: '<string>',
variables: {}
}
],
startPaused: false
})
};
fetch('https://apiv2.vodex.ai/v1/batches', 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",
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([
'name' => '<string>',
'assistantId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'concurrency' => 10,
'retry' => [
'on' => [
'<string>'
],
'attempts' => 5,
'backoffMinutes' => 5040.5
],
'window' => [
'timezone' => 'America/New_York',
'start' => '09:00',
'end' => '20:00',
'days' => [
3
]
],
'suppress' => [
'<string>'
],
'from' => [
'strategy' => 'sticky',
'numbers' => [
[
'e164' => '<string>',
'weight' => 1
]
]
],
'rows' => [
[
'to' => '<string>',
'rowRef' => '<string>',
'assistantId' => '<string>',
'from' => '<string>',
'variables' => [
]
]
],
'startPaused' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"assistantId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"concurrency\": 10,\n \"retry\": {\n \"on\": [\n \"<string>\"\n ],\n \"attempts\": 5,\n \"backoffMinutes\": 5040.5\n },\n \"window\": {\n \"timezone\": \"America/New_York\",\n \"start\": \"09:00\",\n \"end\": \"20:00\",\n \"days\": [\n 3\n ]\n },\n \"suppress\": [\n \"<string>\"\n ],\n \"from\": {\n \"strategy\": \"sticky\",\n \"numbers\": [\n {\n \"e164\": \"<string>\",\n \"weight\": 1\n }\n ]\n },\n \"rows\": [\n {\n \"to\": \"<string>\",\n \"rowRef\": \"<string>\",\n \"assistantId\": \"<string>\",\n \"from\": \"<string>\",\n \"variables\": {}\n }\n ],\n \"startPaused\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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/batches")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"assistantId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"concurrency\": 10,\n \"retry\": {\n \"on\": [\n \"<string>\"\n ],\n \"attempts\": 5,\n \"backoffMinutes\": 5040.5\n },\n \"window\": {\n \"timezone\": \"America/New_York\",\n \"start\": \"09:00\",\n \"end\": \"20:00\",\n \"days\": [\n 3\n ]\n },\n \"suppress\": [\n \"<string>\"\n ],\n \"from\": {\n \"strategy\": \"sticky\",\n \"numbers\": [\n {\n \"e164\": \"<string>\",\n \"weight\": 1\n }\n ]\n },\n \"rows\": [\n {\n \"to\": \"<string>\",\n \"rowRef\": \"<string>\",\n \"assistantId\": \"<string>\",\n \"from\": \"<string>\",\n \"variables\": {}\n }\n ],\n \"startPaused\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.vodex.ai/v1/batches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"assistantId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"concurrency\": 10,\n \"retry\": {\n \"on\": [\n \"<string>\"\n ],\n \"attempts\": 5,\n \"backoffMinutes\": 5040.5\n },\n \"window\": {\n \"timezone\": \"America/New_York\",\n \"start\": \"09:00\",\n \"end\": \"20:00\",\n \"days\": [\n 3\n ]\n },\n \"suppress\": [\n \"<string>\"\n ],\n \"from\": {\n \"strategy\": \"sticky\",\n \"numbers\": [\n {\n \"e164\": \"<string>\",\n \"weight\": 1\n }\n ]\n },\n \"rows\": [\n {\n \"to\": \"<string>\",\n \"rowRef\": \"<string>\",\n \"assistantId\": \"<string>\",\n \"from\": \"<string>\",\n \"variables\": {}\n }\n ],\n \"startPaused\": false\n}"
response = http.request(request)
puts response.read_body{
"batch": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "running",
"runNo": 123,
"assistantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"concurrency": 123,
"retry": {
"on": [
"<string>"
],
"attempts": 5,
"backoffMinutes": 5040.5
},
"window": {
"timezone": "America/New_York",
"start": "09:00",
"end": "20:00",
"days": [
3
]
},
"suppress": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"counts": {}
},
"accepted": 123,
"rejected": [
{
"index": 123,
"rowRef": "<string>",
"to": "<string>",
"reason": "<string>"
}
]
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "<string>",
"rejected": [
{
"index": 123,
"rowRef": "<string>",
"to": "<string>",
"reason": "<string>"
}
]
}Create a batch
Idempotency-Key is mandatory: async producers retry, and a replay
must return the same batch rather than dial the list twice. A replay
answers 202 with Idempotent-Replay: true; the same key with a
different body is 409.
Rows are admitted or reported, never silently dropped. A row whose
prompt says “your balance is ” with no balance is refused
here, where the caller can fix it, rather than dialed and reported as a
normal call. At most 10,000 rows per request — append the rest, or
upload a CSV.
Quota is checked at submission rather than 4,000 dials later.
curl --request POST \
--url https://apiv2.vodex.ai/v1/batches \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"name": "<string>",
"assistantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"concurrency": 10,
"retry": {
"on": [
"<string>"
],
"attempts": 5,
"backoffMinutes": 5040.5
},
"window": {
"timezone": "America/New_York",
"start": "09:00",
"end": "20:00",
"days": [
3
]
},
"suppress": [
"<string>"
],
"from": {
"strategy": "sticky",
"numbers": [
{
"e164": "<string>",
"weight": 1
}
]
},
"rows": [
{
"to": "<string>",
"rowRef": "<string>",
"assistantId": "<string>",
"from": "<string>",
"variables": {}
}
],
"startPaused": false
}
'import requests
url = "https://apiv2.vodex.ai/v1/batches"
payload = {
"name": "<string>",
"assistantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"concurrency": 10,
"retry": {
"on": ["<string>"],
"attempts": 5,
"backoffMinutes": 5040.5
},
"window": {
"timezone": "America/New_York",
"start": "09:00",
"end": "20:00",
"days": [3]
},
"suppress": ["<string>"],
"from": {
"strategy": "sticky",
"numbers": [
{
"e164": "<string>",
"weight": 1
}
]
},
"rows": [
{
"to": "<string>",
"rowRef": "<string>",
"assistantId": "<string>",
"from": "<string>",
"variables": {}
}
],
"startPaused": False
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
assistantId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
concurrency: 10,
retry: {on: ['<string>'], attempts: 5, backoffMinutes: 5040.5},
window: {timezone: 'America/New_York', start: '09:00', end: '20:00', days: [3]},
suppress: ['<string>'],
from: {strategy: 'sticky', numbers: [{e164: '<string>', weight: 1}]},
rows: [
{
to: '<string>',
rowRef: '<string>',
assistantId: '<string>',
from: '<string>',
variables: {}
}
],
startPaused: false
})
};
fetch('https://apiv2.vodex.ai/v1/batches', 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",
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([
'name' => '<string>',
'assistantId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'concurrency' => 10,
'retry' => [
'on' => [
'<string>'
],
'attempts' => 5,
'backoffMinutes' => 5040.5
],
'window' => [
'timezone' => 'America/New_York',
'start' => '09:00',
'end' => '20:00',
'days' => [
3
]
],
'suppress' => [
'<string>'
],
'from' => [
'strategy' => 'sticky',
'numbers' => [
[
'e164' => '<string>',
'weight' => 1
]
]
],
'rows' => [
[
'to' => '<string>',
'rowRef' => '<string>',
'assistantId' => '<string>',
'from' => '<string>',
'variables' => [
]
]
],
'startPaused' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"assistantId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"concurrency\": 10,\n \"retry\": {\n \"on\": [\n \"<string>\"\n ],\n \"attempts\": 5,\n \"backoffMinutes\": 5040.5\n },\n \"window\": {\n \"timezone\": \"America/New_York\",\n \"start\": \"09:00\",\n \"end\": \"20:00\",\n \"days\": [\n 3\n ]\n },\n \"suppress\": [\n \"<string>\"\n ],\n \"from\": {\n \"strategy\": \"sticky\",\n \"numbers\": [\n {\n \"e164\": \"<string>\",\n \"weight\": 1\n }\n ]\n },\n \"rows\": [\n {\n \"to\": \"<string>\",\n \"rowRef\": \"<string>\",\n \"assistantId\": \"<string>\",\n \"from\": \"<string>\",\n \"variables\": {}\n }\n ],\n \"startPaused\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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/batches")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"assistantId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"concurrency\": 10,\n \"retry\": {\n \"on\": [\n \"<string>\"\n ],\n \"attempts\": 5,\n \"backoffMinutes\": 5040.5\n },\n \"window\": {\n \"timezone\": \"America/New_York\",\n \"start\": \"09:00\",\n \"end\": \"20:00\",\n \"days\": [\n 3\n ]\n },\n \"suppress\": [\n \"<string>\"\n ],\n \"from\": {\n \"strategy\": \"sticky\",\n \"numbers\": [\n {\n \"e164\": \"<string>\",\n \"weight\": 1\n }\n ]\n },\n \"rows\": [\n {\n \"to\": \"<string>\",\n \"rowRef\": \"<string>\",\n \"assistantId\": \"<string>\",\n \"from\": \"<string>\",\n \"variables\": {}\n }\n ],\n \"startPaused\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.vodex.ai/v1/batches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"assistantId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"concurrency\": 10,\n \"retry\": {\n \"on\": [\n \"<string>\"\n ],\n \"attempts\": 5,\n \"backoffMinutes\": 5040.5\n },\n \"window\": {\n \"timezone\": \"America/New_York\",\n \"start\": \"09:00\",\n \"end\": \"20:00\",\n \"days\": [\n 3\n ]\n },\n \"suppress\": [\n \"<string>\"\n ],\n \"from\": {\n \"strategy\": \"sticky\",\n \"numbers\": [\n {\n \"e164\": \"<string>\",\n \"weight\": 1\n }\n ]\n },\n \"rows\": [\n {\n \"to\": \"<string>\",\n \"rowRef\": \"<string>\",\n \"assistantId\": \"<string>\",\n \"from\": \"<string>\",\n \"variables\": {}\n }\n ],\n \"startPaused\": false\n}"
response = http.request(request)
puts response.read_body{
"batch": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "running",
"runNo": 123,
"assistantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"concurrency": 123,
"retry": {
"on": [
"<string>"
],
"attempts": 5,
"backoffMinutes": 5040.5
},
"window": {
"timezone": "America/New_York",
"start": "09:00",
"end": "20:00",
"days": [
3
]
},
"suppress": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"counts": {}
},
"accepted": 123,
"rejected": [
{
"index": 123,
"rowRef": "<string>",
"to": "<string>",
"reason": "<string>"
}
]
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "<string>",
"rejected": [
{
"index": 123,
"rowRef": "<string>",
"to": "<string>",
"reason": "<string>"
}
]
}Authorizations
Tenant API key (vdx_live_…) as Authorization: Bearer.
Headers
Required. A retry with the same key and body replays the stored 2xx response; the same key with a different body is 409. A failed attempt releases the key.
8 - 255Body
200The assistant's uuid, shown on its configure page in the console. Names and slugs are not accepted.
1 <= x <= 100Show child attributes
Show child attributes
When this batch may dial — outside it, rows wait rather than fail.
Show child attributes
Show child attributes
E.164 numbers this batch must never dial.
Show child attributes
Show child attributes
10000Show child attributes
Show child attributes