Push
Update a Live Activity
Send new content to a running Live Activity
POST
/
api
/
v1
/
push
/
live-activities
/
update
Update a Live Activity
curl --request POST \
--url https://api.sequenzy.com/api/v1/push/live-activities/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"activityId": "<string>",
"contentState": {},
"alert": {},
"priority": "<string>",
"email": "<string>",
"subscriberId": "<string>",
"staleDate": {},
"relevanceScore": 123
}
'import requests
url = "https://api.sequenzy.com/api/v1/push/live-activities/update"
payload = {
"activityId": "<string>",
"contentState": {},
"alert": {},
"priority": "<string>",
"email": "<string>",
"subscriberId": "<string>",
"staleDate": {},
"relevanceScore": 123
}
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({
activityId: '<string>',
contentState: {},
alert: {},
priority: '<string>',
email: '<string>',
subscriberId: '<string>',
staleDate: {},
relevanceScore: 123
})
};
fetch('https://api.sequenzy.com/api/v1/push/live-activities/update', 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.sequenzy.com/api/v1/push/live-activities/update",
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([
'activityId' => '<string>',
'contentState' => [
],
'alert' => [
],
'priority' => '<string>',
'email' => '<string>',
'subscriberId' => '<string>',
'staleDate' => [
],
'relevanceScore' => 123
]),
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.sequenzy.com/api/v1/push/live-activities/update"
payload := strings.NewReader("{\n \"activityId\": \"<string>\",\n \"contentState\": {},\n \"alert\": {},\n \"priority\": \"<string>\",\n \"email\": \"<string>\",\n \"subscriberId\": \"<string>\",\n \"staleDate\": {},\n \"relevanceScore\": 123\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://api.sequenzy.com/api/v1/push/live-activities/update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"activityId\": \"<string>\",\n \"contentState\": {},\n \"alert\": {},\n \"priority\": \"<string>\",\n \"email\": \"<string>\",\n \"subscriberId\": \"<string>\",\n \"staleDate\": {},\n \"relevanceScore\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/push/live-activities/update")
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 \"activityId\": \"<string>\",\n \"contentState\": {},\n \"alert\": {},\n \"priority\": \"<string>\",\n \"email\": \"<string>\",\n \"subscriberId\": \"<string>\",\n \"staleDate\": {},\n \"relevanceScore\": 123\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"event": "update",
"activityId": "order-1234",
"tokenCount": 1,
"jobIds": ["liveact-91ab-0"],
"message": "Update queued for 1 device."
}
{
"error": "activityId: Use 1-128 letters, digits, dots, colons, dashes or underscores, starting with a letter or digit"
}
{
"error": "Invalid API key"
}
{ "success": false, "error": "Expected property 'contentState' to be object" }
{
"error": "API key is missing required scope: transactional:send"
}
{
"error": "Subscriber not found."
}
Sends new content state to every running copy of a contact’s activity: one per device of that contact that reported an update token for
activityId, whether you started it with start or the app started it. Requires the transactional:send scope.
Activities are always addressed per contact. Any app install can report a token under any activityId, so Sequenzy only sends to the tokens linked to the contact you name.
Each request carries a fixed timestamp. iOS ignores a push that is not newer than the last one it applied, so a retried or late delivery never replaces newer content. When no running copy of the contact’s activity has reported a token yet, the request returns 202 with tokenCount: 0.
Request
string
required
The activity to update.
object
required
The new
ContentState as JSON.object
Optional
title, body and sound. Lights the screen and shows the
expanded view.string
default:"high"
high delivers immediately and counts against Apple’s Live Activity update
budget. low does not count against it and may be delayed. Updates with an
alert always go at high priority.string
Contact whose activity it is. Provide
email or subscriberId.string
Subscriber whose activity it is.
integer | string
Unix seconds or an ISO 8601 date.
number
Orders a person’s concurrent activities.
curl -X POST "https://api.sequenzy.com/api/v1/push/live-activities/update" \
--header "Authorization: Bearer $SEQUENZY_API_KEY" \
--header "Content-Type: application/json" \
--data '{"email":"jane@example.com","activityId":"order-1234","contentState":{"status":"out_for_delivery","minutesAway":8},"priority":"low"}'
Responses
A body with a missing or mistyped field is rejected with422 before any other check; invalid ids, dates and the missing contact return 400.
{
"success": true,
"event": "update",
"activityId": "order-1234",
"tokenCount": 1,
"jobIds": ["liveact-91ab-0"],
"message": "Update queued for 1 device."
}
{
"error": "activityId: Use 1-128 letters, digits, dots, colons, dashes or underscores, starting with a letter or digit"
}
{
"error": "Invalid API key"
}
{ "success": false, "error": "Expected property 'contentState' to be object" }
{
"error": "API key is missing required scope: transactional:send"
}
{
"error": "Subscriber not found."
}
⌘I
Update a Live Activity
curl --request POST \
--url https://api.sequenzy.com/api/v1/push/live-activities/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"activityId": "<string>",
"contentState": {},
"alert": {},
"priority": "<string>",
"email": "<string>",
"subscriberId": "<string>",
"staleDate": {},
"relevanceScore": 123
}
'import requests
url = "https://api.sequenzy.com/api/v1/push/live-activities/update"
payload = {
"activityId": "<string>",
"contentState": {},
"alert": {},
"priority": "<string>",
"email": "<string>",
"subscriberId": "<string>",
"staleDate": {},
"relevanceScore": 123
}
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({
activityId: '<string>',
contentState: {},
alert: {},
priority: '<string>',
email: '<string>',
subscriberId: '<string>',
staleDate: {},
relevanceScore: 123
})
};
fetch('https://api.sequenzy.com/api/v1/push/live-activities/update', 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.sequenzy.com/api/v1/push/live-activities/update",
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([
'activityId' => '<string>',
'contentState' => [
],
'alert' => [
],
'priority' => '<string>',
'email' => '<string>',
'subscriberId' => '<string>',
'staleDate' => [
],
'relevanceScore' => 123
]),
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.sequenzy.com/api/v1/push/live-activities/update"
payload := strings.NewReader("{\n \"activityId\": \"<string>\",\n \"contentState\": {},\n \"alert\": {},\n \"priority\": \"<string>\",\n \"email\": \"<string>\",\n \"subscriberId\": \"<string>\",\n \"staleDate\": {},\n \"relevanceScore\": 123\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://api.sequenzy.com/api/v1/push/live-activities/update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"activityId\": \"<string>\",\n \"contentState\": {},\n \"alert\": {},\n \"priority\": \"<string>\",\n \"email\": \"<string>\",\n \"subscriberId\": \"<string>\",\n \"staleDate\": {},\n \"relevanceScore\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/push/live-activities/update")
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 \"activityId\": \"<string>\",\n \"contentState\": {},\n \"alert\": {},\n \"priority\": \"<string>\",\n \"email\": \"<string>\",\n \"subscriberId\": \"<string>\",\n \"staleDate\": {},\n \"relevanceScore\": 123\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"event": "update",
"activityId": "order-1234",
"tokenCount": 1,
"jobIds": ["liveact-91ab-0"],
"message": "Update queued for 1 device."
}
{
"error": "activityId: Use 1-128 letters, digits, dots, colons, dashes or underscores, starting with a letter or digit"
}
{
"error": "Invalid API key"
}
{ "success": false, "error": "Expected property 'contentState' to be object" }
{
"error": "API key is missing required scope: transactional:send"
}
{
"error": "Subscriber not found."
}