Skip to main content
POST
/
live-activity
/
update
Node
import ActivitySmith from "activitysmith";

const activitysmith = new ActivitySmith({
  apiKey: process.env.ACTIVITYSMITH_API_KEY,
});

await activitysmith.liveActivities.update({
  activity_id: "pLAr-Hnq9ZFW4sxlk43Lhbuok4GLh7UW",
  content_state: {
    title: "Nightly database backup",
    subtitle: "upload archive",
    number_of_steps: 3,
    current_step: 2,
  },
});
import os
from activitysmith import ActivitySmith

activitysmith = ActivitySmith(api_key=os.environ["ACTIVITYSMITH_API_KEY"])

activitysmith.live_activities.update({
"activity_id": "pLAr-Hnq9ZFW4sxlk43Lhbuok4GLh7UW",
"content_state": {
"title": "Nightly database backup",
"subtitle": "upload archive",
"number_of_steps": 3,
"current_step": 2,
},
})
package main

import (
"log"

activitysmithsdk "github.com/ActivitySmithHQ/activitysmith-go"
)

func main() {
activitysmith, err := activitysmithsdk.New("YOUR-API-KEY")
if err != nil {
log.Fatal(err)
}

_, err = activitysmith.LiveActivities.Update(activitysmithsdk.LiveActivityUpdateInput{
ActivityID: "pLAr-Hnq9ZFW4sxlk43Lhbuok4GLh7UW",
Title: "Nightly database backup",
Subtitle: "upload archive",
NumberOfSteps: 3,
CurrentStep: 2,
})
if err != nil {
log.Fatal(err)
}
}
<?php

use ActivitySmith\ActivitySmith;

$activitysmith = new ActivitySmith($_ENV['ACTIVITYSMITH_API_KEY']);

$activitysmith->liveActivities->update([
'activity_id' => 'pLAr-Hnq9ZFW4sxlk43Lhbuok4GLh7UW',
'content_state' => [
'title' => 'Nightly database backup',
'subtitle' => 'upload archive',
'number_of_steps' => 3,
'current_step' => 2,
],
]);
require "activitysmith"

activitysmith = ActivitySmith::Client.new(api_key: ENV.fetch("ACTIVITYSMITH_API_KEY"))

activitysmith.live_activities.update(
activity_id: "pLAr-Hnq9ZFW4sxlk43Lhbuok4GLh7UW",
content_state: {
title: "Nightly database backup",
subtitle: "upload archive",
number_of_steps: 3,
current_step: 2
}
)
curl -X POST "https://activitysmith.com/api/live-activity/update" \
-H "Authorization: Bearer $ACTIVITYSMITH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"activity_id": "pLAr-Hnq9ZFW4sxlk43Lhbuok4GLh7UW",
"content_state": {
"title": "Nightly database backup",
"subtitle": "upload archive",
"number_of_steps": 3,
"current_step": 2
}
}'
{
  "success": true,
  "activity_id": "pLAr-Hnq9ZFW4sxlk43Lhbuok4GLh7UW",
  "devices_notified": 2,
  "devices_queued": 0,
  "timestamp": "2026-01-28T09:57:26.056Z"
}
{
"error": "Forbidden",
"message": "This API key cannot update this Live Activity"
}
{
"error": "Rate limit exceeded",
"message": "Too many requests, please try again later."
}
Use this manual lifecycle endpoint only when you need direct control over a specific Live Activity instance. For new integrations, prefer PUT /live-activity/stream/{stream_key}. This endpoint updates an existing Live Activity by activity_id.
  • metrics: send the latest metrics array.
  • stats: send the latest metrics array for up to 8 labeled values.
  • segmented_progress: send the latest current_step and, if needed, an updated number_of_steps.
  • progress: send the latest percentage, or value with upper_limit.
  • timer: update visible fields such as title, subtitle, or color. Leave duration_seconds out unless you want to change the timer.
  • action is optional if you want to set or replace the Live Activity button.
  • type is optional on update if the existing Live Activity already has a type.
For segmented_progress, you can update both current_step and number_of_steps. Use this when the workflow gains or loses steps after the activity has already started.

Authorizations

Authorization
string
header
required

Required. Include Authorization: Bearer ask_123456789 in every request. Replace ask_123456789 with your API key.

Body

application/json

Update an existing Live Activity by activity_id.

activity_id
string
required
content_state
object
required

Update payload requires title. For segmented_progress include current_step and optionally number_of_steps. For progress include percentage or value with upper_limit. For metrics and stats include a non-empty metrics array. For alert include message. For timer, omit duration_seconds to preserve the current timer window or send duration_seconds to reset the timer from the update request time. Optional icon is supported by all Live Activity types. Optional badge is supported by alert, progress, and segmented_progress. Type is optional when updating an existing activity. You can increase or decrease number_of_steps during updates.

action
object

Optional action button shown in the Live Activity UI. Use action for the primary button, or secondary_action for a secondary button on alert, progress, and segmented_progress Live Activities.

secondary_action
object

Optional secondary action button. Supported only for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.

Response

Live Activity updated (or queued)

Returned after a Live Activity update is sent or queued.

success
boolean
required
activity_id
string
required
timestamp
string<date-time>
required
devices_queued
integer
devices_notified
integer