curl --request POST \
--url https://apiv2.vodex.ai/v1/sms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"to": "<string>",
"message": "<string>",
"smsConfigurationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"templateId": "<string>",
"from": "<string>",
"variables": {},
"contactRef": "<string>",
"callId": "<string>"
}
'import requests
url = "https://apiv2.vodex.ai/v1/sms"
payload = {
"to": "<string>",
"message": "<string>",
"smsConfigurationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"templateId": "<string>",
"from": "<string>",
"variables": {},
"contactRef": "<string>",
"callId": "<string>"
}
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({
to: '<string>',
message: '<string>',
smsConfigurationId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
templateId: '<string>',
from: '<string>',
variables: {},
contactRef: '<string>',
callId: '<string>'
})
};
fetch('https://apiv2.vodex.ai/v1/sms', 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/sms",
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([
'to' => '<string>',
'message' => '<string>',
'smsConfigurationId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'templateId' => '<string>',
'from' => '<string>',
'variables' => [
],
'contactRef' => '<string>',
'callId' => '<string>'
]),
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/sms"
payload := strings.NewReader("{\n \"to\": \"<string>\",\n \"message\": \"<string>\",\n \"smsConfigurationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"templateId\": \"<string>\",\n \"from\": \"<string>\",\n \"variables\": {},\n \"contactRef\": \"<string>\",\n \"callId\": \"<string>\"\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/sms")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"to\": \"<string>\",\n \"message\": \"<string>\",\n \"smsConfigurationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"templateId\": \"<string>\",\n \"from\": \"<string>\",\n \"variables\": {},\n \"contactRef\": \"<string>\",\n \"callId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.vodex.ai/v1/sms")
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 \"to\": \"<string>\",\n \"message\": \"<string>\",\n \"smsConfigurationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"templateId\": \"<string>\",\n \"from\": \"<string>\",\n \"variables\": {},\n \"contactRef\": \"<string>\",\n \"callId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"configurationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"direction": "outbound",
"toNumber": "<string>",
"fromNumber": "<string>",
"body": "<string>",
"status": "queued",
"provider": "<string>",
"providerMessageId": "<string>",
"error": "<string>",
"contactRef": "<string>",
"callId": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "<string>",
"messageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Send an SMS
Idempotency-Key is mandatory — retrying a timeout must never
double-text anyone. Only a 201 is replayed; a validation failure or a
provider rejection releases the key so a corrected retry can reuse
it. The same key with a different body is 409, and a second request
while the first is in flight is also 409.
Every attempt that reaches the provider is logged, sent or failed — the
row is the audit trail. A provider rejection is therefore a 502 that
still carries the logged row’s messageId.
A successful send also enqueues an interaction.completed webhook with
channel: "sms", on the same stream as voice.
curl --request POST \
--url https://apiv2.vodex.ai/v1/sms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"to": "<string>",
"message": "<string>",
"smsConfigurationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"templateId": "<string>",
"from": "<string>",
"variables": {},
"contactRef": "<string>",
"callId": "<string>"
}
'import requests
url = "https://apiv2.vodex.ai/v1/sms"
payload = {
"to": "<string>",
"message": "<string>",
"smsConfigurationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"templateId": "<string>",
"from": "<string>",
"variables": {},
"contactRef": "<string>",
"callId": "<string>"
}
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({
to: '<string>',
message: '<string>',
smsConfigurationId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
templateId: '<string>',
from: '<string>',
variables: {},
contactRef: '<string>',
callId: '<string>'
})
};
fetch('https://apiv2.vodex.ai/v1/sms', 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/sms",
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([
'to' => '<string>',
'message' => '<string>',
'smsConfigurationId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'templateId' => '<string>',
'from' => '<string>',
'variables' => [
],
'contactRef' => '<string>',
'callId' => '<string>'
]),
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/sms"
payload := strings.NewReader("{\n \"to\": \"<string>\",\n \"message\": \"<string>\",\n \"smsConfigurationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"templateId\": \"<string>\",\n \"from\": \"<string>\",\n \"variables\": {},\n \"contactRef\": \"<string>\",\n \"callId\": \"<string>\"\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/sms")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"to\": \"<string>\",\n \"message\": \"<string>\",\n \"smsConfigurationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"templateId\": \"<string>\",\n \"from\": \"<string>\",\n \"variables\": {},\n \"contactRef\": \"<string>\",\n \"callId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.vodex.ai/v1/sms")
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 \"to\": \"<string>\",\n \"message\": \"<string>\",\n \"smsConfigurationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"templateId\": \"<string>\",\n \"from\": \"<string>\",\n \"variables\": {},\n \"contactRef\": \"<string>\",\n \"callId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"configurationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"direction": "outbound",
"toNumber": "<string>",
"fromNumber": "<string>",
"body": "<string>",
"status": "queued",
"provider": "<string>",
"providerMessageId": "<string>",
"error": "<string>",
"contactRef": "<string>",
"callId": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "<string>",
"messageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}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
E.164.
Free text; wins over the configuration's body.
Defaults to the tenant's default configuration.
Provider template; the provider renders it.
E.164 override.
Opaque consumer reference, echoed on the webhook.
Links this message to a call.
Callbacks
POST{$request.body#/webhookUrl}interactionCompleted
Body
The payload Vodex POSTs to your endpoint — not something this API
serves. Documented here because it is the contract configured through
PUT /v1/webhook-config.
interaction.completed, not call.completed: one stream for every
channel, so a consumer writes one handler and switches on channel
rather than integrating a new webhook when SMS or WhatsApp ships.
It is deliberately complete — a consumer that receives this needs no
follow-up GET. analysis is an open envelope: summary and sentiment
land there as additive keys, so a handler written today keeps parsing
tomorrow's payloads.
Headers
| Header | Meaning |
|---|---|
x-vodex-signature | t=<unix>,v1=<hex> where v1 = HMAC-SHA256(secret, "<t>.<raw body>") |
x-vodex-event | The event type |
x-vodex-delivery | Delivery id — the same event retried keeps its id, so use that for idempotency |
The timestamp is inside the signed string, not merely alongside it:
signing the body alone leaves a captured delivery replayable forever,
because nothing in what was signed says when it was sent. Reject
anything more than 300 seconds off in either direction. During a
rotation both secrets sign, as repeated v1= values, so consumers can
move without a coordinated deploy.
Retries
8 attempts at 10s, 30s, 2m, 10m, 30m, 2h, 6h, each with full jitter
(a random point in [0, delay], so a consumer coming back from an
outage is not hit by every queued delivery at the same instant). 408,
429, 5xx and transport failures retry; every other 4xx does not —
repeating a request the consumer called wrong just burns the budget a
real outage needs. A delivery that exhausts its attempts is the dead
letter — status: failed with no nextAttemptAt — and stays visible at
GET /v1/webhook-deliveries.
interaction.completed Idempotency key — stable across retries.
voice-ai, sms Echoed from the dial request, never interpreted.
The counterparty address, for when no contactRef was passed.
Orthogonal facts, never a prose string — a consumer should never have to sniff a string for what happened.
Show child attributes
Show child attributes
Turn-level, with offsets in seconds from the first traced event.
Show child attributes
Show child attributes
Open envelope — additive keys only.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
References, never bytes — audio is resolved through the authed API when a user presses play, so it never leaves its region unbidden.
Show child attributes
Show child attributes
Exactly what the agent knew, frozen at call time — the assistant's config may have changed since.
Show child attributes
Show child attributes
Response
Retried — a timeout is transient.
Response
Sent.
outbound, inbound queued, sent, delivered, failed