curl --request PATCH \
--url https://apiv2.vodex.ai/v1/callbacks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"callbackAt": "2023-11-07T05:31:56Z",
"note": "<string>",
"status": "cancelled"
}
'import requests
url = "https://apiv2.vodex.ai/v1/callbacks/{id}"
payload = {
"callbackAt": "2023-11-07T05:31:56Z",
"note": "<string>",
"status": "cancelled"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({callbackAt: '2023-11-07T05:31:56Z', note: '<string>', status: 'cancelled'})
};
fetch('https://apiv2.vodex.ai/v1/callbacks/{id}', 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/callbacks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'callbackAt' => '2023-11-07T05:31:56Z',
'note' => '<string>',
'status' => 'cancelled'
]),
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/callbacks/{id}"
payload := strings.NewReader("{\n \"callbackAt\": \"2023-11-07T05:31:56Z\",\n \"note\": \"<string>\",\n \"status\": \"cancelled\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://apiv2.vodex.ai/v1/callbacks/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"callbackAt\": \"2023-11-07T05:31:56Z\",\n \"note\": \"<string>\",\n \"status\": \"cancelled\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.vodex.ai/v1/callbacks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"callbackAt\": \"2023-11-07T05:31:56Z\",\n \"note\": \"<string>\",\n \"status\": \"cancelled\"\n}"
response = http.request(request)
puts response.read_body{
"callback": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"to": "<string>",
"from": "<string>",
"assistantId": "<string>",
"callbackAt": "2023-11-07T05:31:56Z",
"timezone": "<string>",
"note": "<string>",
"sourceCallId": "<string>",
"contactRef": "<string>",
"attemptCount": 123,
"lastCallId": "<string>",
"endReason": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "not found",
"earliestAt": "2023-11-07T05:31:56Z"
}Update a callback
One route for three acts, because to a consumer they are the same one: the appointment it learned about from the interaction outcome is no longer right.
status may only be set to cancelled; moving the time is
callbackAt, which is re-checked against the campaign’s calling window
exactly as the agent’s capture was — the window may have been edited, or
DST may have moved it, since the promise was made.
Only a pending callback can change, and the guard is a
compare-and-swap rather than a read-then-write: a callback the drain has
already claimed must not be moved out from under it, so losing that race
is an honest 409.
curl --request PATCH \
--url https://apiv2.vodex.ai/v1/callbacks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"callbackAt": "2023-11-07T05:31:56Z",
"note": "<string>",
"status": "cancelled"
}
'import requests
url = "https://apiv2.vodex.ai/v1/callbacks/{id}"
payload = {
"callbackAt": "2023-11-07T05:31:56Z",
"note": "<string>",
"status": "cancelled"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({callbackAt: '2023-11-07T05:31:56Z', note: '<string>', status: 'cancelled'})
};
fetch('https://apiv2.vodex.ai/v1/callbacks/{id}', 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/callbacks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'callbackAt' => '2023-11-07T05:31:56Z',
'note' => '<string>',
'status' => 'cancelled'
]),
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/callbacks/{id}"
payload := strings.NewReader("{\n \"callbackAt\": \"2023-11-07T05:31:56Z\",\n \"note\": \"<string>\",\n \"status\": \"cancelled\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://apiv2.vodex.ai/v1/callbacks/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"callbackAt\": \"2023-11-07T05:31:56Z\",\n \"note\": \"<string>\",\n \"status\": \"cancelled\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.vodex.ai/v1/callbacks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"callbackAt\": \"2023-11-07T05:31:56Z\",\n \"note\": \"<string>\",\n \"status\": \"cancelled\"\n}"
response = http.request(request)
puts response.read_body{
"callback": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"to": "<string>",
"from": "<string>",
"assistantId": "<string>",
"callbackAt": "2023-11-07T05:31:56Z",
"timezone": "<string>",
"note": "<string>",
"sourceCallId": "<string>",
"contactRef": "<string>",
"attemptCount": 123,
"lastCallId": "<string>",
"endReason": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "not found"
}{
"error": "not found",
"earliestAt": "2023-11-07T05:31:56Z"
}Authorizations
Tenant API key (vdx_live_…) as Authorization: Bearer.
Path Parameters
Body
Response
The updated callback.
A promise made on a call and kept later. callbackAt is the instant that
was stored; timezone is the zone it was reasoned about in and the zone
the confirmation was spoken in — an offset alone cannot answer the window
question across a DST boundary (+01:00 is Lagos in January and London
in July).
Show child attributes
Show child attributes