Update Live Update
Update an existing live update. Changes are automatically logged for audit purposes. Can be used to modify content, schedule, or cancel/restore updates.
curl --request PATCH \
--url https://answeringagent.com/api/v1/live-updates/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Updated System Maintenance",
"message": "System maintenance has been extended. New expected completion time is 4 PM.",
"link": "https://example.com/weekend-sale",
"type": "announcement",
"starts_at": "2025-07-25T14:00:00Z",
"expires_at": "2025-07-25T18:00:00Z",
"is_cancelled": false,
"phone_number_ids": [
1,
2
]
}
'import requests
url = "https://answeringagent.com/api/v1/live-updates/{id}"
payload = {
"title": "Updated System Maintenance",
"message": "System maintenance has been extended. New expected completion time is 4 PM.",
"link": "https://example.com/weekend-sale",
"type": "announcement",
"starts_at": "2025-07-25T14:00:00Z",
"expires_at": "2025-07-25T18:00:00Z",
"is_cancelled": False,
"phone_number_ids": [1, 2]
}
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({
title: 'Updated System Maintenance',
message: 'System maintenance has been extended. New expected completion time is 4 PM.',
link: 'https://example.com/weekend-sale',
type: 'announcement',
starts_at: '2025-07-25T14:00:00Z',
expires_at: '2025-07-25T18:00:00Z',
is_cancelled: false,
phone_number_ids: [1, 2]
})
};
fetch('https://answeringagent.com/api/v1/live-updates/{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://answeringagent.com/api/v1/live-updates/{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([
'title' => 'Updated System Maintenance',
'message' => 'System maintenance has been extended. New expected completion time is 4 PM.',
'link' => 'https://example.com/weekend-sale',
'type' => 'announcement',
'starts_at' => '2025-07-25T14:00:00Z',
'expires_at' => '2025-07-25T18:00:00Z',
'is_cancelled' => false,
'phone_number_ids' => [
1,
2
]
]),
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/{id}"
payload := strings.NewReader("{\n \"title\": \"Updated System Maintenance\",\n \"message\": \"System maintenance has been extended. New expected completion time is 4 PM.\",\n \"link\": \"https://example.com/weekend-sale\",\n \"type\": \"announcement\",\n \"starts_at\": \"2025-07-25T14:00:00Z\",\n \"expires_at\": \"2025-07-25T18:00:00Z\",\n \"is_cancelled\": false,\n \"phone_number_ids\": [\n 1,\n 2\n ]\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://answeringagent.com/api/v1/live-updates/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Updated System Maintenance\",\n \"message\": \"System maintenance has been extended. New expected completion time is 4 PM.\",\n \"link\": \"https://example.com/weekend-sale\",\n \"type\": \"announcement\",\n \"starts_at\": \"2025-07-25T14:00:00Z\",\n \"expires_at\": \"2025-07-25T18:00:00Z\",\n \"is_cancelled\": false,\n \"phone_number_ids\": [\n 1,\n 2\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://answeringagent.com/api/v1/live-updates/{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 \"title\": \"Updated System Maintenance\",\n \"message\": \"System maintenance has been extended. New expected completion time is 4 PM.\",\n \"link\": \"https://example.com/weekend-sale\",\n \"type\": \"announcement\",\n \"starts_at\": \"2025-07-25T14:00:00Z\",\n \"expires_at\": \"2025-07-25T18:00:00Z\",\n \"is_cancelled\": false,\n \"phone_number_ids\": [\n 1,\n 2\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"
},
"history": [
{
"id": 123,
"changes": {},
"created_at": "2023-11-07T05:31:56Z",
"user": {
"id": 123,
"name": "<string>",
"email": "<string>"
}
}
]
},
"message": "Live update updated successfully."
}{
"error": "API key is required"
}{
"message": "This action is unauthorized."
}{
"message": "Live update not found"
}{
"message": "<string>",
"errors": {}
}{
"message": "Failed to update live update. Please try again.",
"errors": {
"general": [
"<string>"
]
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the live update
Body
Title of the live update
3 - 255^[a-zA-Z0-9\s\-_.!?()\x27&@#]+$"Updated System Maintenance"
Detailed message for the live update
10 - 2000"System maintenance has been extended. New expected completion time is 4 PM."
Optional URL for Flash Sale updates. Active Flash Sale links are available as text links.
500"https://example.com/weekend-sale"
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"
When the live update expires (null for no expiration, must be after starts_at)
"2025-07-25T18:00:00Z"
Whether to cancel (true) or restore (false) the live update
false
Array of phone number IDs to apply this update to (empty array means all locations, null means no change)
50[1, 2]
curl --request PATCH \
--url https://answeringagent.com/api/v1/live-updates/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Updated System Maintenance",
"message": "System maintenance has been extended. New expected completion time is 4 PM.",
"link": "https://example.com/weekend-sale",
"type": "announcement",
"starts_at": "2025-07-25T14:00:00Z",
"expires_at": "2025-07-25T18:00:00Z",
"is_cancelled": false,
"phone_number_ids": [
1,
2
]
}
'import requests
url = "https://answeringagent.com/api/v1/live-updates/{id}"
payload = {
"title": "Updated System Maintenance",
"message": "System maintenance has been extended. New expected completion time is 4 PM.",
"link": "https://example.com/weekend-sale",
"type": "announcement",
"starts_at": "2025-07-25T14:00:00Z",
"expires_at": "2025-07-25T18:00:00Z",
"is_cancelled": False,
"phone_number_ids": [1, 2]
}
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({
title: 'Updated System Maintenance',
message: 'System maintenance has been extended. New expected completion time is 4 PM.',
link: 'https://example.com/weekend-sale',
type: 'announcement',
starts_at: '2025-07-25T14:00:00Z',
expires_at: '2025-07-25T18:00:00Z',
is_cancelled: false,
phone_number_ids: [1, 2]
})
};
fetch('https://answeringagent.com/api/v1/live-updates/{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://answeringagent.com/api/v1/live-updates/{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([
'title' => 'Updated System Maintenance',
'message' => 'System maintenance has been extended. New expected completion time is 4 PM.',
'link' => 'https://example.com/weekend-sale',
'type' => 'announcement',
'starts_at' => '2025-07-25T14:00:00Z',
'expires_at' => '2025-07-25T18:00:00Z',
'is_cancelled' => false,
'phone_number_ids' => [
1,
2
]
]),
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/{id}"
payload := strings.NewReader("{\n \"title\": \"Updated System Maintenance\",\n \"message\": \"System maintenance has been extended. New expected completion time is 4 PM.\",\n \"link\": \"https://example.com/weekend-sale\",\n \"type\": \"announcement\",\n \"starts_at\": \"2025-07-25T14:00:00Z\",\n \"expires_at\": \"2025-07-25T18:00:00Z\",\n \"is_cancelled\": false,\n \"phone_number_ids\": [\n 1,\n 2\n ]\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://answeringagent.com/api/v1/live-updates/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Updated System Maintenance\",\n \"message\": \"System maintenance has been extended. New expected completion time is 4 PM.\",\n \"link\": \"https://example.com/weekend-sale\",\n \"type\": \"announcement\",\n \"starts_at\": \"2025-07-25T14:00:00Z\",\n \"expires_at\": \"2025-07-25T18:00:00Z\",\n \"is_cancelled\": false,\n \"phone_number_ids\": [\n 1,\n 2\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://answeringagent.com/api/v1/live-updates/{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 \"title\": \"Updated System Maintenance\",\n \"message\": \"System maintenance has been extended. New expected completion time is 4 PM.\",\n \"link\": \"https://example.com/weekend-sale\",\n \"type\": \"announcement\",\n \"starts_at\": \"2025-07-25T14:00:00Z\",\n \"expires_at\": \"2025-07-25T18:00:00Z\",\n \"is_cancelled\": false,\n \"phone_number_ids\": [\n 1,\n 2\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"
},
"history": [
{
"id": 123,
"changes": {},
"created_at": "2023-11-07T05:31:56Z",
"user": {
"id": 123,
"name": "<string>",
"email": "<string>"
}
}
]
},
"message": "Live update updated successfully."
}{
"error": "API key is required"
}{
"message": "This action is unauthorized."
}{
"message": "Live update not found"
}{
"message": "<string>",
"errors": {}
}{
"message": "Failed to update live update. Please try again.",
"errors": {
"general": [
"<string>"
]
}
}