Update a callback's status
curl --request PATCH \
--url https://api.upliftai.org/v1/campaigns/callbacks/{callbackId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "done"
}
'import requests
url = "https://api.upliftai.org/v1/campaigns/callbacks/{callbackId}"
payload = { "status": "done" }
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({status: 'done'})
};
fetch('https://api.upliftai.org/v1/campaigns/callbacks/{callbackId}', 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://api.upliftai.org/v1/campaigns/callbacks/{callbackId}",
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([
'status' => 'done'
]),
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://api.upliftai.org/v1/campaigns/callbacks/{callbackId}"
payload := strings.NewReader("{\n \"status\": \"done\"\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://api.upliftai.org/v1/campaigns/callbacks/{callbackId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"done\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.upliftai.org/v1/campaigns/callbacks/{callbackId}")
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 \"status\": \"done\"\n}"
response = http.request(request)
puts response.read_body{
"callbackId": "callback_N2Q0MWM5ZTIteHh4eC14eHh4LXh4eHgteHh4eHh4eHh4eHh4Iys5MjMwMDQ1Njc4OTAjYTEjY2I",
"status": "done"
}{
"message": [
"status must be one of the following values: open, done"
],
"error": "Bad Request",
"statusCode": 400
}{
"message": "invalid authorization",
"error": "Unauthorized",
"statusCode": 401
}{
"message": "Forbidden resource",
"error": "Forbidden",
"statusCode": 403
}{
"message": "Callback not found: 7d41c9e2-xxxx-xxxx-xxxx-xxxxxxxxxxxx#+923004567890#a1#cb",
"error": "Not Found",
"statusCode": 404
}{
"message": "Callback timeline is full: 7d41c9e2-xxxx-xxxx-xxxx-xxxxxxxxxxxx#+923004567890#a1#cb",
"error": "Conflict",
"statusCode": 409
}Campaign outcomes
Update a callback's status
Set a callback done as your team works through them, or open to reopen it. Works on any status, scheduled and failed included. Setting the status it already has changes nothing. Each change is added to the callback’s timeline with who made it. Setting a scheduled callback done does not cancel the assistant’s redial.
PATCH
/
campaigns
/
callbacks
/
{callbackId}
Update a callback's status
curl --request PATCH \
--url https://api.upliftai.org/v1/campaigns/callbacks/{callbackId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "done"
}
'import requests
url = "https://api.upliftai.org/v1/campaigns/callbacks/{callbackId}"
payload = { "status": "done" }
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({status: 'done'})
};
fetch('https://api.upliftai.org/v1/campaigns/callbacks/{callbackId}', 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://api.upliftai.org/v1/campaigns/callbacks/{callbackId}",
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([
'status' => 'done'
]),
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://api.upliftai.org/v1/campaigns/callbacks/{callbackId}"
payload := strings.NewReader("{\n \"status\": \"done\"\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://api.upliftai.org/v1/campaigns/callbacks/{callbackId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"done\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.upliftai.org/v1/campaigns/callbacks/{callbackId}")
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 \"status\": \"done\"\n}"
response = http.request(request)
puts response.read_body{
"callbackId": "callback_N2Q0MWM5ZTIteHh4eC14eHh4LXh4eHgteHh4eHh4eHh4eHh4Iys5MjMwMDQ1Njc4OTAjYTEjY2I",
"status": "done"
}{
"message": [
"status must be one of the following values: open, done"
],
"error": "Bad Request",
"statusCode": 400
}{
"message": "invalid authorization",
"error": "Unauthorized",
"statusCode": 401
}{
"message": "Forbidden resource",
"error": "Forbidden",
"statusCode": 403
}{
"message": "Callback not found: 7d41c9e2-xxxx-xxxx-xxxx-xxxxxxxxxxxx#+923004567890#a1#cb",
"error": "Not Found",
"statusCode": 404
}{
"message": "Callback timeline is full: 7d41c9e2-xxxx-xxxx-xxxx-xxxxxxxxxxxx#+923004567890#a1#cb",
"error": "Conflict",
"statusCode": 409
}Authorizations
Project API key (sk_api_…).
Path Parameters
The callbackId from the callbacks list or a callback webhook.
Body
application/json
done marks the request handled; open reopens it.
Available options:
open, done 