Skip to main content
PATCH
/
live-updates
/
{id}
Update Live Update
curl --request PATCH \
  --url https://playground.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.",
  "type": "announcement",
  "starts_at": "2025-07-25T14:00:00Z",
  "expires_at": "2025-07-25T18:00:00Z",
  "is_cancelled": false,
  "phone_number_ids": [
    1,
    2
  ]
}
'
{
  "data": {
    "id": 1,
    "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",
    "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": "[email protected]"
    },
    "history": [
      {
        "id": 123,
        "action": "created",
        "changes": {},
        "created_at": "2023-11-07T05:31:56Z",
        "user": {
          "id": 123,
          "name": "<string>",
          "email": "<string>"
        }
      }
    ]
  },
  "message": "Live update updated successfully."
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
integer
required

The ID of the live update

Body

application/json
title
string

Title of the live update

Required string length: 3 - 255
Example:

"Updated System Maintenance"

message
string

Detailed message for the live update

Required string length: 10 - 2000
Example:

"System maintenance has been extended. New expected completion time is 4 PM."

type
enum<string>

Type of live update

Available options:
announcement,
wait_time,
flash_sale,
closure,
schedule_change
Example:

"announcement"

starts_at
string<date-time>

When the live update becomes active (ISO 8601 format)

Example:

"2025-07-25T14:00:00Z"

expires_at
string<date-time> | null

When the live update expires (null for no expiration, must be after starts_at)

Example:

"2025-07-25T18:00:00Z"

is_cancelled
boolean

Whether to cancel (true) or restore (false) the live update

Example:

false

phone_number_ids
integer[] | null

Array of phone number IDs to apply this update to (empty array means all locations, null means no change)

Maximum array length: 50
Example:
[1, 2]

Response

Live update updated successfully

data
object
message
enum<string>
Available options:
Live update updated successfully.,
Live update cancelled successfully.,
Live update restored successfully.
Example:

"Live update updated successfully."