Create Live Update
Create a new live update to inform callers about current conditions, wait times, or special announcements. Updates can be applied to all locations or specific phone numbers.
curl --request POST \
--url https://answeringagent.com/api/v1/live-updates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Temporary System Maintenance",
"message": "We are currently performing system maintenance. Expected completion time is 2 PM.",
"type": "announcement",
"starts_at": "2025-07-25T14:00:00Z",
"link": "https://example.com/weekend-sale",
"expires_at": "2025-07-25T16:00:00Z",
"phone_number_ids": [
1,
2,
3
]
}
'import requests
url = "https://answeringagent.com/api/v1/live-updates"
payload = {
"title": "Temporary System Maintenance",
"message": "We are currently performing system maintenance. Expected completion time is 2 PM.",
"type": "announcement",
"starts_at": "2025-07-25T14:00:00Z",
"link": "https://example.com/weekend-sale",
"expires_at": "2025-07-25T16:00:00Z",
"phone_number_ids": [1, 2, 3]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Temporary System Maintenance',
message: 'We are currently performing system maintenance. Expected completion time is 2 PM.',
type: 'announcement',
starts_at: '2025-07-25T14:00:00Z',
link: 'https://example.com/weekend-sale',
expires_at: '2025-07-25T16:00:00Z',
phone_number_ids: [1, 2, 3]
})
};
fetch('https://answeringagent.com/api/v1/live-updates', 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://answeringagent.com/api/v1/live-updates",
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([
'title' => 'Temporary System Maintenance',
'message' => 'We are currently performing system maintenance. Expected completion time is 2 PM.',
'type' => 'announcement',
'starts_at' => '2025-07-25T14:00:00Z',
'link' => 'https://example.com/weekend-sale',
'expires_at' => '2025-07-25T16:00:00Z',
'phone_number_ids' => [
1,
2,
3
]
]),
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://answeringagent.com/api/v1/live-updates"
payload := strings.NewReader("{\n \"title\": \"Temporary System Maintenance\",\n \"message\": \"We are currently performing system maintenance. Expected completion time is 2 PM.\",\n \"type\": \"announcement\",\n \"starts_at\": \"2025-07-25T14:00:00Z\",\n \"link\": \"https://example.com/weekend-sale\",\n \"expires_at\": \"2025-07-25T16:00:00Z\",\n \"phone_number_ids\": [\n 1,\n 2,\n 3\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://answeringagent.com/api/v1/live-updates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Temporary System Maintenance\",\n \"message\": \"We are currently performing system maintenance. Expected completion time is 2 PM.\",\n \"type\": \"announcement\",\n \"starts_at\": \"2025-07-25T14:00:00Z\",\n \"link\": \"https://example.com/weekend-sale\",\n \"expires_at\": \"2025-07-25T16:00:00Z\",\n \"phone_number_ids\": [\n 1,\n 2,\n 3\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://answeringagent.com/api/v1/live-updates")
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"] = 'application/json'
request.body = "{\n \"title\": \"Temporary System Maintenance\",\n \"message\": \"We are currently performing system maintenance. Expected completion time is 2 PM.\",\n \"type\": \"announcement\",\n \"starts_at\": \"2025-07-25T14:00:00Z\",\n \"link\": \"https://example.com/weekend-sale\",\n \"expires_at\": \"2025-07-25T16:00:00Z\",\n \"phone_number_ids\": [\n 1,\n 2,\n 3\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 1,
"title": "Temporary System Maintenance",
"message": "We are currently performing system maintenance. Expected completion time is 2 PM.",
"link": "https://example.com/weekend-sale",
"type": "announcement",
"starts_at": "2025-07-25T14:00:00Z",
"expires_at": "2025-07-25T16:00:00Z",
"is_cancelled": false,
"created_at": "2025-07-25T10:30:00Z",
"updated_at": "2025-07-25T11:45:00Z",
"phone_numbers": [
{
"id": 1,
"name": "Main Office",
"phone_number": "+1234567890"
}
],
"created_by": {
"id": 1,
"name": "John Doe",
"email": "john@example.com"
}
},
"message": "Live update created successfully."
}{
"error": "API key is required"
}{
"message": "No team selected."
}{
"message": "<string>",
"errors": {}
}{
"message": "Failed to create live update. Please try again.",
"errors": {
"general": [
"<string>"
]
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Title of the live update
3 - 255^[a-zA-Z0-9\s\-_.!?()\x27&@#]+$"Temporary System Maintenance"
Detailed message for the live update
10 - 2000"We are currently performing system maintenance. Expected completion time is 2 PM."
Type of live update
announcement, wait_time, flash_sale, closure, schedule_change "announcement"
When the live update becomes active (ISO 8601 format)
"2025-07-25T14:00:00Z"
Optional URL for Flash Sale updates. Active Flash Sale links are available as text links.
500"https://example.com/weekend-sale"
When the live update expires (null for no expiration, must be after starts_at)
"2025-07-25T16:00:00Z"
Array of phone number IDs to apply this update to (empty array or null means all locations)
50[1, 2, 3]
curl --request POST \
--url https://answeringagent.com/api/v1/live-updates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Temporary System Maintenance",
"message": "We are currently performing system maintenance. Expected completion time is 2 PM.",
"type": "announcement",
"starts_at": "2025-07-25T14:00:00Z",
"link": "https://example.com/weekend-sale",
"expires_at": "2025-07-25T16:00:00Z",
"phone_number_ids": [
1,
2,
3
]
}
'import requests
url = "https://answeringagent.com/api/v1/live-updates"
payload = {
"title": "Temporary System Maintenance",
"message": "We are currently performing system maintenance. Expected completion time is 2 PM.",
"type": "announcement",
"starts_at": "2025-07-25T14:00:00Z",
"link": "https://example.com/weekend-sale",
"expires_at": "2025-07-25T16:00:00Z",
"phone_number_ids": [1, 2, 3]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'Temporary System Maintenance',
message: 'We are currently performing system maintenance. Expected completion time is 2 PM.',
type: 'announcement',
starts_at: '2025-07-25T14:00:00Z',
link: 'https://example.com/weekend-sale',
expires_at: '2025-07-25T16:00:00Z',
phone_number_ids: [1, 2, 3]
})
};
fetch('https://answeringagent.com/api/v1/live-updates', 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://answeringagent.com/api/v1/live-updates",
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([
'title' => 'Temporary System Maintenance',
'message' => 'We are currently performing system maintenance. Expected completion time is 2 PM.',
'type' => 'announcement',
'starts_at' => '2025-07-25T14:00:00Z',
'link' => 'https://example.com/weekend-sale',
'expires_at' => '2025-07-25T16:00:00Z',
'phone_number_ids' => [
1,
2,
3
]
]),
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://answeringagent.com/api/v1/live-updates"
payload := strings.NewReader("{\n \"title\": \"Temporary System Maintenance\",\n \"message\": \"We are currently performing system maintenance. Expected completion time is 2 PM.\",\n \"type\": \"announcement\",\n \"starts_at\": \"2025-07-25T14:00:00Z\",\n \"link\": \"https://example.com/weekend-sale\",\n \"expires_at\": \"2025-07-25T16:00:00Z\",\n \"phone_number_ids\": [\n 1,\n 2,\n 3\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://answeringagent.com/api/v1/live-updates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Temporary System Maintenance\",\n \"message\": \"We are currently performing system maintenance. Expected completion time is 2 PM.\",\n \"type\": \"announcement\",\n \"starts_at\": \"2025-07-25T14:00:00Z\",\n \"link\": \"https://example.com/weekend-sale\",\n \"expires_at\": \"2025-07-25T16:00:00Z\",\n \"phone_number_ids\": [\n 1,\n 2,\n 3\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://answeringagent.com/api/v1/live-updates")
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"] = 'application/json'
request.body = "{\n \"title\": \"Temporary System Maintenance\",\n \"message\": \"We are currently performing system maintenance. Expected completion time is 2 PM.\",\n \"type\": \"announcement\",\n \"starts_at\": \"2025-07-25T14:00:00Z\",\n \"link\": \"https://example.com/weekend-sale\",\n \"expires_at\": \"2025-07-25T16:00:00Z\",\n \"phone_number_ids\": [\n 1,\n 2,\n 3\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 1,
"title": "Temporary System Maintenance",
"message": "We are currently performing system maintenance. Expected completion time is 2 PM.",
"link": "https://example.com/weekend-sale",
"type": "announcement",
"starts_at": "2025-07-25T14:00:00Z",
"expires_at": "2025-07-25T16:00:00Z",
"is_cancelled": false,
"created_at": "2025-07-25T10:30:00Z",
"updated_at": "2025-07-25T11:45:00Z",
"phone_numbers": [
{
"id": 1,
"name": "Main Office",
"phone_number": "+1234567890"
}
],
"created_by": {
"id": 1,
"name": "John Doe",
"email": "john@example.com"
}
},
"message": "Live update created successfully."
}{
"error": "API key is required"
}{
"message": "No team selected."
}{
"message": "<string>",
"errors": {}
}{
"message": "Failed to create live update. Please try again.",
"errors": {
"general": [
"<string>"
]
}
}