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

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

await activitysmith.liveActivities.end({
  activity_id: "pLAr-Hnq9ZFW4sxlk43Lhbuok4GLh7UW",
  content_state: {
    title: "Nightly database backup",
    subtitle: "verify restore",
    number_of_steps: 3,
    current_step: 3,
    auto_dismiss_minutes: 2,
  },
});
{
  "success": true,
  "activity_id": "pLAr-Hnq9ZFW4sxlk43Lhbuok4GLh7UW",
  "devices_notified": 2,
  "devices_queued": 0,
  "timestamp": "2026-01-28T09:57:29.258Z"
}

Documentation Index

Fetch the complete documentation index at: https://activitysmith.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Use this endpoint to end an existing Live Activity by activity_id.
  • metrics: send the final metrics array if you want the ended state to show final values.
  • stats: send the final metrics array if you want the ended state to show final labeled values.
  • segmented_progress: send the final current_step and optionally the latest number_of_steps.
  • progress: send the final percentage, or value with upper_limit.
  • action is optional if you want the ended state to keep showing a button before dismissal.
  • auto_dismiss_minutes is optional if you want to control how long the ended Live Activity stays visible.
For segmented_progress, the final payload can include an updated number_of_steps as well as the final current_step. The step count does not need to match the value used when the activity 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

End an existing Live Activity by activity_id.

activity_id
string
required
content_state
object
required

End 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. Type is optional when ending an existing activity. You can send an updated number_of_steps here if the workflow changed after start.

action
object

Optional single action button shown in the Live Activity UI.

Response

Live Activity ended

Returned after a Live Activity end event is sent or queued.

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